RecipeView.xaml 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549
  1. <UserControl x:Class="Aitex.Sorter.UI.Views.RecipeView"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:local="clr-namespace:Aitex.Sorter.UI.Views"
  7. xmlns:uc="clr-namespace:Aitex.Sorter.UI.Controls"
  8. xmlns:converter="clr-namespace:Aitex.Sorter.UI.Converter"
  9. xmlns:Common="clr-namespace:Aitex.Sorter.Common;assembly=MECF.Framework.Common"
  10. xmlns:ctrlCommon="clr-namespace:Aitex.Sorter.UI.Controls.Common"
  11. xmlns:sys="clr-namespace:System;assembly=mscorlib"
  12. xmlns:equipment="clr-namespace:MECF.Framework.Common.Equipment;assembly=MECF.Framework.Common"
  13. mc:Ignorable="d"
  14. d:DesignHeight="780" d:DesignWidth="1920">
  15. <UserControl.Resources>
  16. <Style x:Key="ListViewItemStyle" TargetType="{x:Type ListViewItem}">
  17. <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
  18. </Style>
  19. <local:RecipeLayoutConvert x:Key="RecipeLayoutConvert" />
  20. <Grid x:Key="t" Grid.Column="5" ctrlCommon:GridHelper.Column0="LightBlue" ctrlCommon:GridHelper.Column1="Transparent">
  21. <Grid.Resources>
  22. <Style TargetType="Label">
  23. <Setter Property="HorizontalAlignment" Value="Center" />
  24. <Setter Property="VerticalAlignment" Value="Center" />
  25. </Style>
  26. </Grid.Resources>
  27. <Grid.RowDefinitions>
  28. <RowDefinition Height="0" />
  29. <RowDefinition Height="40" />
  30. <RowDefinition Height="40" />
  31. <RowDefinition Height="40" />
  32. <RowDefinition Height="40" />
  33. <RowDefinition Height="40" />
  34. <RowDefinition Height="60" />
  35. <RowDefinition Height="40" />
  36. <RowDefinition Height="*" />
  37. </Grid.RowDefinitions>
  38. <Grid.ColumnDefinitions>
  39. <ColumnDefinition Width="160" />
  40. <ColumnDefinition Width="*" />
  41. </Grid.ColumnDefinitions>
  42. <Label Grid.Row="1" Grid.Column="0" Content="Source:" />
  43. <StackPanel Grid.Row="1" Grid.Column="1" Orientation="Horizontal" HorizontalAlignment="Left" Margin="18,0" VerticalAlignment="Center">
  44. <RadioButton Content="Both" IsChecked="{Binding CurrentRecipe.Source, Converter={StaticResource valueMatchConverter}, ConverterParameter={x:Static equipment:ModuleName.System}}"/>
  45. <RadioButton Content="LP1" Margin="18,0" IsChecked="{Binding CurrentRecipe.Source, Converter={StaticResource valueMatchConverter}, ConverterParameter={x:Static equipment:ModuleName.LP1}}" />
  46. <RadioButton Content="LP2" Margin="18,0" IsChecked="{Binding CurrentRecipe.Source, Converter={StaticResource valueMatchConverter}, ConverterParameter={x:Static equipment:ModuleName.LP2}}" />
  47. </StackPanel>
  48. <Label Grid.Row="2" Grid.Column="0" Content="Destination:" />
  49. <StackPanel Grid.Row="2" Grid.Column="1" Orientation="Horizontal" HorizontalAlignment="Left" Margin="18,0" VerticalAlignment="Center" >
  50. <RadioButton Content="Both" IsChecked="{Binding CurrentRecipe.Destination, Converter={StaticResource valueMatchConverter}, ConverterParameter={x:Static equipment:ModuleName.System}}" />
  51. <RadioButton Content="LP1" Margin="18,0" IsChecked="{Binding CurrentRecipe.Destination, Converter={StaticResource valueMatchConverter}, ConverterParameter={x:Static equipment:ModuleName.LP1}}" />
  52. <RadioButton Content="LP2" Margin="18,0" IsChecked="{Binding CurrentRecipe.Destination, Converter={StaticResource valueMatchConverter}, ConverterParameter={x:Static equipment:ModuleName.LP2}}" />
  53. </StackPanel>
  54. <Label Grid.Row="3" Grid.Column="0" Content="Place Mode:" />
  55. <ComboBox Grid.Row="3" Grid.Column="1" Width="300" Height="30" HorizontalAlignment="Left" Margin="18,0"
  56. SelectedValuePath="Key"
  57. DisplayMemberPath ="Value"
  58. SelectedValue="{Binding CurrentRecipe.PlaceModeTransfer1To1}"
  59. ItemsSource="{Binding PlaceMode1To1}"
  60. />
  61. <Label Grid.Row="4" Grid.Column="0" Content="Read Laser Mark:" />
  62. <StackPanel Orientation="Horizontal" Grid.Row="4" Grid.Column="1">
  63. <CheckBox Content="Laser Mark" HorizontalAlignment="Left" Margin="18,0" VerticalAlignment="Center" IsChecked="{Binding CurrentRecipe.IsReadLaserMarker}" />
  64. <CheckBox Content="T7 Code" HorizontalAlignment="Left" Margin="18,0" VerticalAlignment="Center" IsChecked="{Binding CurrentRecipe.IsReadT7Code}" />
  65. </StackPanel>
  66. <Label Grid.Row="5" Grid.Column="0" Content="Align:" />
  67. <CheckBox Grid.Row="5" Grid.Column="1" HorizontalAlignment="Left" Margin="18,0" VerticalAlignment="Center" IsChecked="{Binding CurrentRecipe.IsAlign}" />
  68. <Label Grid.Row="6" Grid.Column="0" Content="Align Angle:" />
  69. <TextBox Grid.Row="6" Grid.Column="1" HorizontalAlignment="Left" Width="200" Margin="18,4" VerticalAlignment="Center" Text="{Binding CurrentRecipe.AlignAngle, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
  70. <Label Grid.Row="7" Grid.Column="0" Content="Transfer Table:" />
  71. <ListView ItemContainerStyle="{StaticResource ResourceKey=ListViewItemStyle}" Grid.Row="8" Grid.Column="0" Grid.ColumnSpan="2" Margin="4,4" ItemsSource="{Binding CurrentRecipe.TransferItems}">
  72. <ListView.View>
  73. <GridView>
  74. <GridViewColumn Header="Source" Width="100" DisplayMemberBinding="{Binding SourceStation}" />
  75. <GridViewColumn Header="Slot" Width="60" DisplayMemberBinding="{Binding SourceSlot,Converter={StaticResource slotToIndexConverter}}" />
  76. <GridViewColumn Header="Destination" Width="100" DisplayMemberBinding="{Binding DestinationStation}" />
  77. <GridViewColumn Header="Slot" Width="60" DisplayMemberBinding="{Binding DestinationSlot,Converter={StaticResource slotToIndexConverter}}" />
  78. <GridViewColumn Header="Read Laser Mark" Width="160" >
  79. <GridViewColumn.CellTemplate>
  80. <DataTemplate>
  81. <CheckBox IsChecked="{Binding IsReadLaserMarker}" HorizontalAlignment="Center" />
  82. </DataTemplate>
  83. </GridViewColumn.CellTemplate>
  84. </GridViewColumn>
  85. <GridViewColumn Header="Read T7 Code" Width="160" >
  86. <GridViewColumn.CellTemplate>
  87. <DataTemplate>
  88. <CheckBox IsChecked="{Binding IsReadT7Code}" HorizontalAlignment="Center" />
  89. </DataTemplate>
  90. </GridViewColumn.CellTemplate>
  91. </GridViewColumn>
  92. <GridViewColumn Header="Align" Width="60" >
  93. <GridViewColumn.CellTemplate>
  94. <DataTemplate>
  95. <CheckBox IsChecked="{Binding IsAlign}" HorizontalAlignment="Center" />
  96. </DataTemplate>
  97. </GridViewColumn.CellTemplate>
  98. </GridViewColumn>
  99. <GridViewColumn Header="Angle" Width="80" >
  100. <GridViewColumn.CellTemplate>
  101. <DataTemplate>
  102. <TextBox Text="{Binding AlignAngle}" Width="50" Height="20" />
  103. </DataTemplate>
  104. </GridViewColumn.CellTemplate>
  105. </GridViewColumn>
  106. <GridViewColumn Header="Action" Width="85" >
  107. <GridViewColumn.CellTemplate>
  108. <DataTemplate>
  109. <Button Content="Remove" Height="28" ToolTip="Remove" Width="60" Command="{Binding DataContext.RemoveResultCommand, ElementName=root}" CommandParameter="{Binding}" />
  110. </DataTemplate>
  111. </GridViewColumn.CellTemplate>
  112. </GridViewColumn>
  113. </GridView>
  114. </ListView.View>
  115. </ListView>
  116. </Grid>
  117. <Grid x:Key="1To1" Grid.Column="5" ctrlCommon:GridHelper.Column0="LightBlue" ctrlCommon:GridHelper.Column1="Transparent">
  118. <Grid.Resources>
  119. <Style TargetType="Label">
  120. <Setter Property="HorizontalAlignment" Value="Center" />
  121. <Setter Property="VerticalAlignment" Value="Center" />
  122. </Style>
  123. </Grid.Resources>
  124. <Grid.RowDefinitions>
  125. <RowDefinition Height="0" />
  126. <RowDefinition Height="40" />
  127. <RowDefinition Height="40" />
  128. <RowDefinition Height="40" />
  129. <RowDefinition Height="40" />
  130. <RowDefinition Height="40" />
  131. <RowDefinition Height="60" />
  132. <RowDefinition Height="40" />
  133. <RowDefinition Height="*" />
  134. </Grid.RowDefinitions>
  135. <Grid.ColumnDefinitions>
  136. <ColumnDefinition Width="160" />
  137. <ColumnDefinition Width="*" />
  138. </Grid.ColumnDefinitions>
  139. <Label Grid.Row="1" Grid.Column="0" Content="Source:" />
  140. <StackPanel Grid.Row="1" Grid.Column="1" Orientation="Horizontal" HorizontalAlignment="Left" Margin="18,0" VerticalAlignment="Center">
  141. <RadioButton Content="LP1" Margin="18,0"
  142. IsChecked="{Binding CurrentRecipe.Source, Converter={StaticResource valueMatchConverter}, ConverterParameter={x:Static equipment:ModuleName.LP1},Mode=TwoWay}"
  143. Command="{Binding SourceDestinationCommand}" CommandParameter="1"/>
  144. <RadioButton Content="LP2" Margin="18,0"
  145. IsChecked="{Binding CurrentRecipe.Source, Converter={StaticResource valueMatchConverter}, ConverterParameter={x:Static equipment:ModuleName.LP2},Mode=TwoWay}"
  146. Command="{Binding SourceDestinationCommand}" CommandParameter="1"/>
  147. </StackPanel>
  148. <Label Grid.Row="2" Grid.Column="0" Content="Destination:" />
  149. <StackPanel Grid.Row="2" Grid.Column="1" Orientation="Horizontal" HorizontalAlignment="Left" Margin="18,0" VerticalAlignment="Center" >
  150. <RadioButton Content="LP1" Margin="18,0"
  151. IsChecked="{Binding CurrentRecipe.Destination, Converter={StaticResource valueMatchConverter}, ConverterParameter={x:Static equipment:ModuleName.LP1},Mode=TwoWay}"
  152. Command="{Binding SourceDestinationCommand}" CommandParameter="2"/>
  153. <RadioButton Content="LP2" Margin="18,0"
  154. IsChecked="{Binding CurrentRecipe.Destination, Converter={StaticResource valueMatchConverter}, ConverterParameter={x:Static equipment:ModuleName.LP2},Mode=TwoWay}"
  155. Command="{Binding SourceDestinationCommand}" CommandParameter="2"/>
  156. </StackPanel>
  157. <Label Grid.Row="3" Grid.Column="0" Content="Place Mode:" />
  158. <ComboBox Grid.Row="3" Grid.Column="1" Width="300" Height="30" HorizontalAlignment="Left" Margin="18,0"
  159. SelectedValuePath="Key"
  160. DisplayMemberPath ="Value"
  161. SelectedValue="{Binding CurrentRecipe.PlaceModeTransfer1To1}"
  162. ItemsSource="{Binding PlaceMode1To1}"
  163. />
  164. <Label Grid.Row="4" Grid.Column="0" Content="Read Laser Mark:" />
  165. <StackPanel Orientation="Horizontal" Grid.Row="4" Grid.Column="1">
  166. <CheckBox Content="Laser Mark" HorizontalAlignment="Left" Margin="18,0" VerticalAlignment="Center" IsChecked="{Binding CurrentRecipe.IsReadLaserMarker}" />
  167. <CheckBox Content="T7 Code" HorizontalAlignment="Left" Margin="18,0" VerticalAlignment="Center" IsChecked="{Binding CurrentRecipe.IsReadT7Code}" />
  168. </StackPanel>
  169. <Label Grid.Row="5" Grid.Column="0" Content="Align:" />
  170. <CheckBox Grid.Row="5" Grid.Column="1" HorizontalAlignment="Left" Margin="18,0" VerticalAlignment="Center" IsChecked="{Binding CurrentRecipe.IsAlign}" />
  171. <Label Grid.Row="6" Grid.Column="0" Content="Align Angle:" />
  172. <TextBox Grid.Row="6" Grid.Column="1" HorizontalAlignment="Left" Width="200" Margin="18,4" VerticalAlignment="Center" Text="{Binding CurrentRecipe.AlignAngle, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
  173. </Grid>
  174. <Grid x:Key="NToN" Grid.Column="5" ctrlCommon:GridHelper.Column0="LightBlue" ctrlCommon:GridHelper.Column1="Transparent">
  175. <Grid.Resources>
  176. <Style TargetType="Label">
  177. <Setter Property="HorizontalAlignment" Value="Center" />
  178. <Setter Property="VerticalAlignment" Value="Center" />
  179. </Style>
  180. </Grid.Resources>
  181. <Grid.RowDefinitions>
  182. <RowDefinition Height="0" />
  183. <RowDefinition Height="0" />
  184. <RowDefinition Height="0" />
  185. <RowDefinition Height="0" />
  186. <RowDefinition Height="40" />
  187. <RowDefinition Height="40" />
  188. <RowDefinition Height="60" />
  189. <RowDefinition Height="40" />
  190. <RowDefinition Height="*" />
  191. </Grid.RowDefinitions>
  192. <Grid.ColumnDefinitions>
  193. <ColumnDefinition Width="160" />
  194. <ColumnDefinition Width="*" />
  195. </Grid.ColumnDefinitions>
  196. <Label Grid.Row="4" Grid.Column="0" Content="Read Laser Mark:" />
  197. <StackPanel Orientation="Horizontal" Grid.Row="4" Grid.Column="1">
  198. <CheckBox Content="Laser Mark" HorizontalAlignment="Left" Margin="18,0" VerticalAlignment="Center" IsChecked="{Binding CurrentRecipe.IsReadLaserMarker}" />
  199. <CheckBox Content="T7 Code" HorizontalAlignment="Left" Margin="18,0" VerticalAlignment="Center" IsChecked="{Binding CurrentRecipe.IsReadT7Code}" />
  200. </StackPanel>
  201. <Label Grid.Row="5" Grid.Column="0" Content="Align:" />
  202. <CheckBox Grid.Row="5" Grid.Column="1" HorizontalAlignment="Left" Margin="18,0" VerticalAlignment="Center" IsChecked="{Binding CurrentRecipe.IsAlign}" />
  203. <Label Grid.Row="6" Grid.Column="0" Content="Align Angle:" />
  204. <TextBox Grid.Row="6" Grid.Column="1" HorizontalAlignment="Left" Width="200" Margin="18,4" VerticalAlignment="Center" Text="{Binding CurrentRecipe.AlignAngle, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
  205. <Label Grid.Row="7" Grid.Column="0" Content="Transfer Table:" />
  206. <ListView ItemContainerStyle="{StaticResource ResourceKey=ListViewItemStyle}" Grid.Row="8" Grid.Column="0" Grid.ColumnSpan="2" Margin="4,4" ItemsSource="{Binding CurrentRecipe.TransferItems}">
  207. <ListView.View>
  208. <GridView>
  209. <GridViewColumn Header="Source" Width="100" DisplayMemberBinding="{Binding SourceStation}" />
  210. <GridViewColumn Header="Slot" Width="60" DisplayMemberBinding="{Binding SourceSlot,Converter={StaticResource slotToIndexConverter}}" />
  211. <GridViewColumn Header="Destination" Width="100" DisplayMemberBinding="{Binding DestinationStation}" />
  212. <GridViewColumn Header="Slot" Width="60" DisplayMemberBinding="{Binding DestinationSlot,Converter={StaticResource slotToIndexConverter}}" />
  213. <GridViewColumn Header="Read Laser Mark" Width="160" >
  214. <GridViewColumn.CellTemplate>
  215. <DataTemplate>
  216. <CheckBox IsChecked="{Binding IsReadLaserMarker}" HorizontalAlignment="Center" />
  217. </DataTemplate>
  218. </GridViewColumn.CellTemplate>
  219. </GridViewColumn>
  220. <GridViewColumn Header="Read T7 Code" Width="160" >
  221. <GridViewColumn.CellTemplate>
  222. <DataTemplate>
  223. <CheckBox IsChecked="{Binding IsReadT7Code}" HorizontalAlignment="Center" />
  224. </DataTemplate>
  225. </GridViewColumn.CellTemplate>
  226. </GridViewColumn>
  227. <GridViewColumn Header="Align" Width="60" >
  228. <GridViewColumn.CellTemplate>
  229. <DataTemplate>
  230. <CheckBox IsChecked="{Binding IsAlign}" HorizontalAlignment="Center" />
  231. </DataTemplate>
  232. </GridViewColumn.CellTemplate>
  233. </GridViewColumn>
  234. <GridViewColumn Header="Angle" Width="80" >
  235. <GridViewColumn.CellTemplate>
  236. <DataTemplate>
  237. <TextBox Text="{Binding AlignAngle}" Width="50" Height="20" />
  238. </DataTemplate>
  239. </GridViewColumn.CellTemplate>
  240. </GridViewColumn>
  241. <GridViewColumn Header="Action" Width="85" >
  242. <GridViewColumn.CellTemplate>
  243. <DataTemplate>
  244. <Button Content="Remove" Height="28" ToolTip="Remove" Width="60" Command="{Binding DataContext.RemoveResultCommand, ElementName=root}" CommandParameter="{Binding}" />
  245. </DataTemplate>
  246. </GridViewColumn.CellTemplate>
  247. </GridViewColumn>
  248. </GridView>
  249. </ListView.View>
  250. </ListView>
  251. </Grid>
  252. <Grid x:Key="Pack" Grid.Column="5" ctrlCommon:GridHelper.Column0="LightBlue" ctrlCommon:GridHelper.Column1="Transparent">
  253. <Grid.Resources>
  254. <Style TargetType="Label">
  255. <Setter Property="HorizontalAlignment" Value="Center" />
  256. <Setter Property="VerticalAlignment" Value="Center" />
  257. </Style>
  258. </Grid.Resources>
  259. <Grid.RowDefinitions>
  260. <RowDefinition Height="0" />
  261. <RowDefinition Height="40" />
  262. <RowDefinition Height="0" />
  263. <RowDefinition Height="40" />
  264. <RowDefinition Height="40" />
  265. <RowDefinition Height="40" />
  266. <RowDefinition Height="60" />
  267. <RowDefinition Height="40" />
  268. <RowDefinition Height="*" />
  269. </Grid.RowDefinitions>
  270. <Grid.ColumnDefinitions>
  271. <ColumnDefinition Width="160" />
  272. <ColumnDefinition Width="*" />
  273. </Grid.ColumnDefinitions>
  274. <Label Grid.Row="1" Grid.Column="0" Content="Source:" />
  275. <StackPanel Grid.Row="1" Grid.Column="1" Orientation="Horizontal" HorizontalAlignment="Left" Margin="18,0" VerticalAlignment="Center">
  276. <RadioButton Content="LP1" Margin="18,0" IsChecked="{Binding CurrentRecipe.Source, Converter={StaticResource valueMatchConverter}, ConverterParameter={x:Static equipment:ModuleName.LP1}}" />
  277. <RadioButton Content="LP2" Margin="18,0" IsChecked="{Binding CurrentRecipe.Source, Converter={StaticResource valueMatchConverter}, ConverterParameter={x:Static equipment:ModuleName.LP2}}" />
  278. </StackPanel>
  279. <Label Grid.Row="3" Grid.Column="0" Content="Place Mode:" />
  280. <ComboBox Grid.Row="3" Grid.Column="1" Width="300" Height="30" HorizontalAlignment="Left" Margin="18,0"
  281. SelectedValuePath="Key"
  282. DisplayMemberPath ="Value"
  283. SelectedValue="{Binding CurrentRecipe.PlaceModePack}"
  284. ItemsSource="{Binding PlaceModePack}"
  285. />
  286. <Label Grid.Row="4" Grid.Column="0" Content="Read Laser Mark:" />
  287. <StackPanel Orientation="Horizontal" Grid.Row="4" Grid.Column="1">
  288. <CheckBox Content="Laser Mark" HorizontalAlignment="Left" Margin="18,0" VerticalAlignment="Center" IsChecked="{Binding CurrentRecipe.IsReadLaserMarker}" />
  289. <CheckBox Content="T7 Code" HorizontalAlignment="Left" Margin="18,0" VerticalAlignment="Center" IsChecked="{Binding CurrentRecipe.IsReadT7Code}" />
  290. </StackPanel>
  291. <Label Grid.Row="5" Grid.Column="0" Content="Align:" />
  292. <CheckBox Grid.Row="5" Grid.Column="1" HorizontalAlignment="Left" Margin="18,0" VerticalAlignment="Center" IsChecked="{Binding CurrentRecipe.IsAlign}" />
  293. <Label Grid.Row="6" Grid.Column="0" Content="Align Angle:" />
  294. <TextBox Grid.Row="6" Grid.Column="1" HorizontalAlignment="Left" Width="200" Margin="18,4" VerticalAlignment="Center" Text="{Binding CurrentRecipe.AlignAngle, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
  295. </Grid>
  296. <Grid x:Key="Order" Grid.Column="5" ctrlCommon:GridHelper.Column0="LightBlue" ctrlCommon:GridHelper.Column1="Transparent">
  297. <Grid.Resources>
  298. <Style TargetType="Label">
  299. <Setter Property="HorizontalAlignment" Value="Center" />
  300. <Setter Property="VerticalAlignment" Value="Center" />
  301. </Style>
  302. </Grid.Resources>
  303. <Grid.RowDefinitions>
  304. <RowDefinition Height="40" />
  305. <RowDefinition Height="40" />
  306. <RowDefinition Height="0" />
  307. <RowDefinition Height="40" />
  308. <RowDefinition Height="40" />
  309. <RowDefinition Height="40" />
  310. <RowDefinition Height="60" />
  311. <RowDefinition Height="40" />
  312. <RowDefinition Height="*" />
  313. </Grid.RowDefinitions>
  314. <Grid.ColumnDefinitions>
  315. <ColumnDefinition Width="160" />
  316. <ColumnDefinition Width="*" />
  317. </Grid.ColumnDefinitions>
  318. <Label Grid.Row="0" Grid.Column="0" Content="Order By:" />
  319. <StackPanel Grid.Row="0" Grid.Column="1" Orientation="Horizontal" HorizontalAlignment="Left" Margin="18,0" VerticalAlignment="Center">
  320. <RadioButton GroupName="order" Margin="18,0" Content="Laser Mark" IsChecked="{Binding CurrentRecipe.OrderBy, Converter={StaticResource valueMatchConverter}, ConverterParameter={x:Static Common:OrderByMode.LaserMarker}}" />
  321. <RadioButton GroupName="order" Margin="18,0" Content="T7 Code" IsChecked="{Binding CurrentRecipe.OrderBy, Converter={StaticResource valueMatchConverter}, ConverterParameter={x:Static Common:OrderByMode.T7Code}}"/>
  322. </StackPanel>
  323. <Label Grid.Row="1" Grid.Column="0" Content="Source:" />
  324. <StackPanel Grid.Row="1" Grid.Column="1" Orientation="Horizontal" HorizontalAlignment="Left" Margin="18,0" VerticalAlignment="Center">
  325. <RadioButton Content="LP1" Margin="18,0" IsChecked="{Binding CurrentRecipe.Source, Converter={StaticResource valueMatchConverter}, ConverterParameter={x:Static equipment:ModuleName.LP1}}" />
  326. <RadioButton Content="LP2" Margin="18,0" IsChecked="{Binding CurrentRecipe.Source, Converter={StaticResource valueMatchConverter}, ConverterParameter={x:Static equipment:ModuleName.LP2}}" />
  327. </StackPanel>
  328. <Label Grid.Row="3" Grid.Column="0" Content="Place Mode:" />
  329. <ComboBox Grid.Row="3" Grid.Column="1" Width="300" Height="30" HorizontalAlignment="Left" Margin="18,0"
  330. SelectedValuePath="Key"
  331. DisplayMemberPath ="Value"
  332. SelectedValue="{Binding CurrentRecipe.PlaceModeOrder}"
  333. ItemsSource="{Binding PlaceModeOrder}"
  334. />
  335. <Label Grid.Row="4" Grid.Column="0" Content="Read Laser Mark:" />
  336. <StackPanel Orientation="Horizontal" Grid.Row="4" Grid.Column="1">
  337. <CheckBox Content="Laser Mark" HorizontalAlignment="Left" Margin="18,0" VerticalAlignment="Center" IsChecked="{Binding CurrentRecipe.IsReadLaserMarker}" />
  338. <CheckBox Content="T7 Code" HorizontalAlignment="Left" Margin="18,0" VerticalAlignment="Center" IsChecked="{Binding CurrentRecipe.IsReadT7Code}" />
  339. </StackPanel>
  340. <Label Grid.Row="5" Grid.Column="0" Content="Align:" />
  341. <CheckBox Grid.Row="5" Grid.Column="1" HorizontalAlignment="Left" Margin="18,0" VerticalAlignment="Center" IsChecked="{Binding CurrentRecipe.IsAlign}" />
  342. <Label Grid.Row="6" Grid.Column="0" Content="Align Angle:" />
  343. <TextBox Grid.Row="6" Grid.Column="1" HorizontalAlignment="Left" Width="200" Margin="18,4" VerticalAlignment="Center" Text="{Binding CurrentRecipe.AlignAngle, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
  344. </Grid>
  345. <Grid x:Key="Host" Grid.Column="5" ctrlCommon:GridHelper.Column0="LightBlue" ctrlCommon:GridHelper.Column1="Transparent">
  346. <Grid.Resources>
  347. <Style TargetType="Label">
  348. <Setter Property="HorizontalAlignment" Value="Center" />
  349. <Setter Property="VerticalAlignment" Value="Center" />
  350. </Style>
  351. </Grid.Resources>
  352. <Grid.RowDefinitions>
  353. <RowDefinition Height="0" />
  354. <RowDefinition Height="0" />
  355. <RowDefinition Height="0" />
  356. <RowDefinition Height="0" />
  357. <RowDefinition Height="40" />
  358. <RowDefinition Height="40" />
  359. <RowDefinition Height="40" />
  360. <RowDefinition Height="40" />
  361. <RowDefinition Height="0" />
  362. </Grid.RowDefinitions>
  363. <Grid.ColumnDefinitions>
  364. <ColumnDefinition Width="160" />
  365. <ColumnDefinition Width="*" />
  366. </Grid.ColumnDefinitions>
  367. <Label Grid.Row="5" Grid.Column="0" Content="Verify:" />
  368. <StackPanel Orientation="Horizontal" Grid.Row="5" Grid.Column="1">
  369. <CheckBox Content="Laser Mark" HorizontalAlignment="Left" Margin="18,0" VerticalAlignment="Center" />
  370. <CheckBox Content="T7 Code" HorizontalAlignment="Left" Margin="18,0" VerticalAlignment="Center" />
  371. <CheckBox Content="Any" HorizontalAlignment="Left" Margin="18,0" VerticalAlignment="Center" />
  372. </StackPanel>
  373. <Label Grid.Row="4" Grid.Column="0" Content="Read:" />
  374. <StackPanel Orientation="Horizontal" Grid.Row="4" Grid.Column="1">
  375. <CheckBox Content="Laser Mark" HorizontalAlignment="Left" Margin="18,0" VerticalAlignment="Center" />
  376. <CheckBox Content="T7 Code" HorizontalAlignment="Left" Margin="18,0" VerticalAlignment="Center" />
  377. </StackPanel>
  378. <Label Grid.Row="6" Grid.Column="0" Content="Align:" />
  379. <CheckBox Grid.Row="6" Grid.Column="1" HorizontalAlignment="Left" Margin="18,0" VerticalAlignment="Center" />
  380. <Label Grid.Row="7" Grid.Column="0" Content="Align Angle:" />
  381. <TextBox Grid.Row="7" Grid.Column="1" HorizontalAlignment="Left" Width="200" Height="30" Margin="18,4" VerticalAlignment="Center" />
  382. </Grid>
  383. <Grid x:Key="Default" Grid.Column="5" ctrlCommon:GridHelper.Column0="LightBlue" ctrlCommon:GridHelper.Column1="Transparent">
  384. <Grid.Resources>
  385. <Style TargetType="Label">
  386. <Setter Property="HorizontalAlignment" Value="Center" />
  387. <Setter Property="VerticalAlignment" Value="Center" />
  388. </Style>
  389. </Grid.Resources>
  390. <Grid.RowDefinitions>
  391. <RowDefinition Height="0" />
  392. <RowDefinition Height="40" />
  393. <RowDefinition Height="0" />
  394. <RowDefinition Height="0" />
  395. <RowDefinition Height="40" />
  396. <RowDefinition Height="40" />
  397. <RowDefinition Height="60" />
  398. <RowDefinition Height="40" />
  399. <RowDefinition Height="*" />
  400. </Grid.RowDefinitions>
  401. <Grid.ColumnDefinitions>
  402. <ColumnDefinition Width="160" />
  403. <ColumnDefinition Width="*" />
  404. </Grid.ColumnDefinitions>
  405. <Label Grid.Row="1" Grid.Column="0" Content="Source:" />
  406. <StackPanel Grid.Row="1" Grid.Column="1" Orientation="Horizontal" HorizontalAlignment="Left" Margin="18,0" VerticalAlignment="Center">
  407. <RadioButton Content="LP1" Margin="18,0" IsChecked="{Binding CurrentRecipe.Source, Converter={StaticResource valueMatchConverter}, ConverterParameter={x:Static equipment:ModuleName.LP1}}" />
  408. <RadioButton Content="LP2" Margin="18,0" IsChecked="{Binding CurrentRecipe.Source, Converter={StaticResource valueMatchConverter}, ConverterParameter={x:Static equipment:ModuleName.LP2}}" />
  409. </StackPanel>
  410. <Label Grid.Row="4" Grid.Column="0" Content="Read Laser Mark:" />
  411. <StackPanel Orientation="Horizontal" Grid.Row="4" Grid.Column="1">
  412. <CheckBox Content="Laser Mark" HorizontalAlignment="Left" Margin="18,0" VerticalAlignment="Center" IsChecked="{Binding CurrentRecipe.IsReadLaserMarker}" />
  413. <CheckBox Content="T7 Code" HorizontalAlignment="Left" Margin="18,0" VerticalAlignment="Center" IsChecked="{Binding CurrentRecipe.IsReadT7Code}" />
  414. </StackPanel>
  415. <Label Grid.Row="5" Grid.Column="0" Content="Align:" />
  416. <CheckBox Grid.Row="5" Grid.Column="1" HorizontalAlignment="Left" Margin="18,0" VerticalAlignment="Center" IsChecked="{Binding CurrentRecipe.IsAlign}" />
  417. <Label Grid.Row="6" Grid.Column="0" Content="Align Angle:" />
  418. <TextBox Grid.Row="6" Grid.Column="1" HorizontalAlignment="Left" Width="200" Margin="18,4" VerticalAlignment="Center" Text="{Binding CurrentRecipe.AlignAngle, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
  419. </Grid>
  420. </UserControl.Resources>
  421. <Grid x:Name="root">
  422. <Grid.ColumnDefinitions>
  423. <ColumnDefinition Width="450" />
  424. <ColumnDefinition Width="*" />
  425. </Grid.ColumnDefinitions>
  426. <DockPanel x:Name="leftContainer">
  427. <Grid DockPanel.Dock="Top" Margin="0,10,0,10">
  428. <WrapPanel Orientation="Horizontal">
  429. <Button x:Name="btnAdd" Click="btnAdd_Click" Content="Add..." />
  430. <Button Content="Rename" x:Name="btnRename" Click="btnRename_Click" />
  431. <Button Content="Save As..." x:Name="btnCopy" Click="btnCopy_Click" />
  432. <Button Content="Delete" x:Name="btnDelete" Click="btnDelete_Click" />
  433. </WrapPanel>
  434. </Grid>
  435. <ListBox x:Name="lstRecipe" SelectionChanged="lstRecipe_SelectionChanged" Width="{Binding ElementName=leftContainer, Path=ActualWidth, Converter={StaticResource sizeOffsetConvert}, ConverterParameter=30}" ItemsSource="{Binding RecipeList}" Margin="0,0,0,8">
  436. </ListBox>
  437. </DockPanel>
  438. <DockPanel Grid.Column="1" Margin="10,8" x:Name="container">
  439. <Grid DockPanel.Dock="Top">
  440. <Grid.ColumnDefinitions>
  441. <ColumnDefinition Width="*" />
  442. <ColumnDefinition Width="400" />
  443. </Grid.ColumnDefinitions>
  444. <Label Content="Recipe Selected:" Margin="20,4,0,0" />
  445. <Label Margin="200,4,0,0">
  446. <Run Text="{Binding CurrentRecipe.Name}" />
  447. </Label>
  448. <Button x:Name="btnSave" Click="btnSave_Click" Grid.Column="1" Content="Save" HorizontalAlignment="Left" />
  449. <Button Grid.Column="1" Content="Cancel" HorizontalAlignment="Left" Margin="120,4,0,0" x:Name="btnCancel" Click="btnCancel_Click" />
  450. </Grid>
  451. <Border IsEnabled="{Binding CurrentRecipe, Converter={StaticResource valueNotMatchConverter}}" HorizontalAlignment="Left" VerticalAlignment="Top" BorderThickness="1" BorderBrush="#84a567" Background="#d6f1ff" Width="{Binding ElementName=container, Path=ActualWidth, Converter={StaticResource sizeOffsetConvert}, ConverterParameter=8}" Height="{Binding ElementName=container, Path=ActualHeight, Converter={StaticResource sizeOffsetConvert}, ConverterParameter=50}" Margin="0">
  452. <Grid >
  453. <Grid.ColumnDefinitions>
  454. <ColumnDefinition Width="10" />
  455. <ColumnDefinition Width="188" />
  456. <ColumnDefinition Width="60" />
  457. <ColumnDefinition Width="188" />
  458. <ColumnDefinition Width="10" />
  459. <ColumnDefinition Width="*" />
  460. </Grid.ColumnDefinitions>
  461. <uc:Foup Height="668" Grid.Column="1" x:Name="foup1" Title="Carrier 1" SlotCount="25" Slots="{Binding FoupAWaferInfo}" Station="{Binding Source={x:Static equipment:ModuleName.LP1}}" WaferTransferCommand="{Binding WaferTransferCommand}" WaferTransferOptionCommand="{Binding WaferTransferOptionCommand}" IsEnabled="{Binding CurrentRecipe.RecipeType, Converter={StaticResource valueMatchConverter}, ConverterParameter={x:Static Common:SorterRecipeType.TransferNToN}}" />
  462. <uc:Foup Height="668" Grid.Column="3" x:Name="foup2" Title="Carrier 2" SlotCount="25" Slots="{Binding FoupBWaferInfo}" Station="{Binding Source={x:Static equipment:ModuleName.LP2}}" WaferTransferCommand="{Binding WaferTransferCommand}" WaferTransferOptionCommand="{Binding WaferTransferOptionCommand}" IsEnabled="{Binding CurrentRecipe.RecipeType, Converter={StaticResource valueMatchConverter}, ConverterParameter={x:Static Common:SorterRecipeType.TransferNToN}}" />
  463. <Grid Grid.Column="5" ctrlCommon:GridHelper.Column0="LightBlue" ctrlCommon:GridHelper.Column1="Transparent">
  464. <Grid.Resources>
  465. <Style TargetType="Label">
  466. <Setter Property="HorizontalAlignment" Value="Center" />
  467. <Setter Property="VerticalAlignment" Value="Center" />
  468. </Style>
  469. </Grid.Resources>
  470. <Grid.RowDefinitions>
  471. <RowDefinition Height="40" />
  472. <RowDefinition Height="*" />
  473. </Grid.RowDefinitions>
  474. <Grid.ColumnDefinitions>
  475. <ColumnDefinition Width="160" />
  476. <ColumnDefinition Width="*" />
  477. </Grid.ColumnDefinitions>
  478. <Label Grid.Row="0" Grid.Column="0" Content="Recipe Type:" />
  479. <ComboBox Grid.Row="0" Grid.Column="1" x:Name="cbRecipeType" Width="300" Height="30" HorizontalAlignment="Left" Margin="18,0" SelectedValue="{Binding CurrentRecipe.RecipeType, Mode=TwoWay}">
  480. </ComboBox>
  481. <ContentControl Grid.Row="1" Grid.ColumnSpan ="2">
  482. <ContentControl.Content>
  483. <MultiBinding Converter="{StaticResource RecipeLayoutConvert}">
  484. <Binding ElementName="cbRecipeType" Path="SelectedValue" />
  485. <Binding ElementName="root" />
  486. </MultiBinding>
  487. </ContentControl.Content>
  488. </ContentControl>
  489. </Grid>
  490. </Grid>
  491. </Border>
  492. </DockPanel>
  493. </Grid>
  494. </UserControl>