LoadPortViewBase.xaml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  1. <UserControl x:Class="Aitex.Sorter.UI.Views.Maintenance.LoadPortViewBase"
  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.Maintenance"
  7. xmlns:Common="clr-namespace:Aitex.Sorter.Common;assembly=Aitex.Sorter.Common"
  8. xmlns:FWCommon="clr-namespace:Aitex.Sorter.Common;assembly=MECF.Framework.Common"
  9. xmlns:ctrlCommon="clr-namespace:Aitex.Sorter.UI.Controls.Common"
  10. xmlns:deviceControl="clr-namespace:Aitex.Core.UI.DeviceControl;assembly=MECF.Framework.UI.Core"
  11. xmlns:uc="clr-namespace:Aitex.Sorter.UI.Controls"
  12. mc:Ignorable="d"
  13. d:DesignHeight="300" d:DesignWidth="300">
  14. <Grid x:Name="root">
  15. <ScrollViewer>
  16. <ItemsControl ItemsSource="{Binding FoupList}" VerticalAlignment="Center" HorizontalAlignment="Center">
  17. <ItemsControl.Resources>
  18. <Style TargetType="Label">
  19. <Setter Property="VerticalAlignment" Value="Center" />
  20. <Setter Property="HorizontalAlignment" Value="Center" />
  21. </Style>
  22. <Style TargetType="Button" BasedOn="{StaticResource {x:Type Button}}">
  23. <Setter Property="VerticalAlignment" Value="Center" />
  24. </Style>
  25. <DataTemplate x:Key="opencassette">
  26. <uc:HeaderPanel Grid.Row="0" Width="800" Height="220" HorizontalAlignment="left" VerticalAlignment="Top" Header="{Binding DeviceName}" Margin="10,10,0,0">
  27. <Grid ctrlCommon:GridHelper.Column0="{StaticResource Table_BG_Title}" ctrlCommon:GridHelper.Column1="Transparent" ctrlCommon:GridHelper.Column2="{StaticResource Table_BG_Title}" ctrlCommon:GridHelper.Column3="Transparent">
  28. <Grid.ColumnDefinitions>
  29. <ColumnDefinition Width="0.8*" />
  30. <ColumnDefinition Width="*" />
  31. <ColumnDefinition Width="auto" />
  32. </Grid.ColumnDefinitions>
  33. <Grid.RowDefinitions>
  34. <RowDefinition Height="*" />
  35. <RowDefinition Height="*" />
  36. <RowDefinition Height="*" />
  37. </Grid.RowDefinitions>
  38. <Label Grid.Row="0" Grid.Column="0" Content="Present" />
  39. <ctrlCommon:LED Grid.Row="0" Grid.Column="1" On="{Binding Present}" />
  40. <Label Grid.Row="1" Grid.Column="0" Content="Placed" />
  41. <ctrlCommon:LED Grid.Row="1" Grid.Column="1" On="{Binding Placement}" />
  42. <Label Grid.Row="2" Grid.Column="0" Content="Carrier ID" />
  43. <TextBox Grid.Row="2" Grid.Column="1" Width="200" Height="28" Text="{Binding FoupID}" ctrlCommon:CommandHelper.CommandName="{x:Static Common:OperationName.WriteFoupID}" ctrlCommon:CommandHelper.Target="{Binding DeviceName}" ctrlCommon:CommandHelper.Parameter1="{Binding Text, RelativeSource={RelativeSource Self}}" ctrlCommon:TextBoxBehavior.SelectAllTextOnFocus="True">
  44. <TextBox.InputBindings>
  45. <KeyBinding Command="{Binding DataContext.LoadPortCommand, ElementName=root}" CommandParameter="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type TextBox}}}" Key="Return" />
  46. </TextBox.InputBindings>
  47. </TextBox>
  48. <!--<Button Grid.Row="2" Grid.Column="2" Content="Read" Command="{Binding DataContext.LoadPortCommand, ElementName=root}" ctrlCommon:CommandHelper.CommandName="{x:Static Common:OperationName.ReadFoupID}" ctrlCommon:CommandHelper.Target="{Binding DeviceName}"/>-->
  49. <Button Grid.Row="2" Grid.Column="2" Content="Read" Command="{Binding DataContext.LoadPortCommand, ElementName=root}" ctrlCommon:CommandHelper.CommandName="{x:Static Common:OperationName.Scan}" ctrlCommon:CommandHelper.Target="{Binding Station}"/>
  50. </Grid>
  51. </uc:HeaderPanel>
  52. </DataTemplate>
  53. <DataTemplate x:Key="opencassettenoreadid">
  54. <uc:HeaderPanel Grid.Row="0" Width="800" Height="220" HorizontalAlignment="left" VerticalAlignment="Top" Header="{Binding DeviceName}" Margin="10,10,0,0">
  55. <Grid ctrlCommon:GridHelper.Column0="{StaticResource Table_BG_Title}" ctrlCommon:GridHelper.Column1="Transparent" ctrlCommon:GridHelper.Column2="{StaticResource Table_BG_Title}" ctrlCommon:GridHelper.Column3="Transparent">
  56. <Grid.ColumnDefinitions>
  57. <ColumnDefinition Width="0.8*" />
  58. <ColumnDefinition Width="*" />
  59. </Grid.ColumnDefinitions>
  60. <Grid.RowDefinitions>
  61. <RowDefinition Height="*" />
  62. <RowDefinition Height="*" />
  63. </Grid.RowDefinitions>
  64. <Label Grid.Row="0" Grid.Column="0" Content="Present" />
  65. <ctrlCommon:LED Grid.Row="0" Grid.Column="1" On="{Binding Present}" />
  66. <Label Grid.Row="1" Grid.Column="0" Content="Placed" />
  67. <ctrlCommon:LED Grid.Row="1" Grid.Column="1" On="{Binding Placement}" />
  68. </Grid>
  69. </uc:HeaderPanel>
  70. </DataTemplate>
  71. <DataTemplate x:Key="loadport" >
  72. <uc:HeaderPanel Grid.Column="0" HorizontalAlignment="left" VerticalAlignment="Top" Width="800" Header="{Binding DeviceName}" Margin="10,10,0,0">
  73. <uc:LPStatus
  74. Present="{Binding IndicatiorPresence, Converter={StaticResource valueMatchConverter}, ConverterParameter={x:Static FWCommon:IndicatorState.ON}}"
  75. Placed="{Binding IndicatiorPlacement, Converter={StaticResource valueMatchConverter}, ConverterParameter={x:Static FWCommon:IndicatorState.ON}}"
  76. ClampStatus="{Binding ClampState}"
  77. FoupDoorStatus="{Binding DoorState}"
  78. Status="{Binding Status}"
  79. CassetteState="{Binding CassetteState}"
  80. LoadPortLoaded="{Binding IndicatiorLoad, Converter={StaticResource valueMatchConverter}, ConverterParameter={x:Static FWCommon:IndicatorState.ON}}"
  81. LoadPortUnloaded="{Binding IndicatiorUnload, Converter={StaticResource valueMatchConverter}, ConverterParameter={x:Static FWCommon:IndicatorState.ON}}"
  82. IsAlarm="{Binding IndicatiorAlarm, Converter={StaticResource valueMatchConverter}, ConverterParameter={x:Static FWCommon:IndicatorState.ON}}"
  83. Station="{Binding DeviceName}"
  84. IsAutoMode="{Binding IndicatiorAccessAuto, Converter={StaticResource valueMatchConverter}, ConverterParameter={x:Static FWCommon:IndicatorState.ON}}"
  85. IsManualMode="{Binding IndicatiorAccessManual, Converter={StaticResource valueMatchConverter}, ConverterParameter={x:Static FWCommon:IndicatorState.ON}}"
  86. >
  87. </uc:LPStatus>
  88. </uc:HeaderPanel>
  89. </DataTemplate>
  90. <DataTemplate x:Key="SMIF" >
  91. <uc:HeaderPanel Grid.Column="0" HorizontalAlignment="left" VerticalAlignment="Top" Width="800" Header="{Binding DeviceName}" Margin="10,10,0,0">
  92. <uc:SMIFStatus
  93. Present="{Binding IndicatiorPresence, Converter={StaticResource valueMatchConverter}, ConverterParameter={x:Static FWCommon:IndicatorState.ON}}"
  94. Placed="{Binding IndicatiorPlacement, Converter={StaticResource valueMatchConverter}, ConverterParameter={x:Static FWCommon:IndicatorState.ON}}"
  95. ClampStatus="{Binding ClampState}"
  96. FoupDoorStatus="{Binding DoorState}"
  97. Status="{Binding Status}"
  98. CassetteState="{Binding CassetteState}"
  99. LoadPortLoaded="{Binding IndicatiorLoad, Converter={StaticResource valueMatchConverter}, ConverterParameter={x:Static FWCommon:IndicatorState.ON}}"
  100. LoadPortUnloaded="{Binding IndicatiorUnload, Converter={StaticResource valueMatchConverter}, ConverterParameter={x:Static FWCommon:IndicatorState.ON}}"
  101. IsAlarm="{Binding IndicatiorAlarm, Converter={StaticResource valueMatchConverter}, ConverterParameter={x:Static FWCommon:IndicatorState.ON}}"
  102. Station="{Binding DeviceName}"
  103. >
  104. </uc:SMIFStatus>
  105. </uc:HeaderPanel>
  106. </DataTemplate>
  107. <DataTemplate x:Key="LoadportMapButtonControl" >
  108. <uc:HeaderPanel Grid.Column="0" HorizontalAlignment="left" VerticalAlignment="Top" Width="800" Header="{Binding DeviceName}" Margin="10,10,0,0">
  109. <uc:LPStatus
  110. Present="{Binding IndicatiorPresence, Converter={StaticResource valueMatchConverter}, ConverterParameter={x:Static FWCommon:IndicatorState.ON}}"
  111. Placed="{Binding IndicatiorPlacement, Converter={StaticResource valueMatchConverter}, ConverterParameter={x:Static FWCommon:IndicatorState.ON}}"
  112. ClampStatus="{Binding ClampState}"
  113. FoupDoorStatus="{Binding DoorState}"
  114. Status="{Binding Status}"
  115. CassetteState="{Binding CassetteState}"
  116. LoadPortLoaded="{Binding IndicatiorLoad, Converter={StaticResource valueMatchConverter}, ConverterParameter={x:Static FWCommon:IndicatorState.ON}}"
  117. LoadPortUnloaded="{Binding IndicatiorUnload, Converter={StaticResource valueMatchConverter}, ConverterParameter={x:Static FWCommon:IndicatorState.ON}}"
  118. IsAlarm="{Binding IndicatiorAlarm, Converter={StaticResource valueMatchConverter}, ConverterParameter={x:Static FWCommon:IndicatorState.ON}}"
  119. Station="{Binding DeviceName}"
  120. >
  121. </uc:LPStatus>
  122. </uc:HeaderPanel>
  123. </DataTemplate>
  124. <DataTemplate x:Key="nothing">
  125. <uc:HeaderPanel Grid.Row="0" Width="800" Height="220" HorizontalAlignment="left" VerticalAlignment="Top" Margin="10,10,0,0" Visibility="Collapsed">
  126. </uc:HeaderPanel>
  127. </DataTemplate>
  128. </ItemsControl.Resources>
  129. <ItemsControl.ItemsPanel>
  130. <ItemsPanelTemplate>
  131. <WrapPanel />
  132. </ItemsPanelTemplate>
  133. </ItemsControl.ItemsPanel>
  134. <ItemsControl.ItemTemplate>
  135. <DataTemplate>
  136. <ContentControl Content="{Binding}">
  137. <ContentControl.Style>
  138. <Style TargetType="ContentControl">
  139. <Style.Triggers>
  140. <DataTrigger Binding="{Binding FoupType}" Value="SMIF">
  141. <Setter Property="ContentTemplate" Value="{StaticResource SMIF}" />
  142. </DataTrigger>
  143. <DataTrigger Binding="{Binding FoupType}" Value="LoadportMapButtonControl">
  144. <Setter Property="ContentTemplate" Value="{StaticResource LoadportMapButtonControl}" />
  145. </DataTrigger>
  146. <DataTrigger Binding="{Binding FoupType}" Value="Loadport">
  147. <Setter Property="ContentTemplate" Value="{StaticResource loadport}" />
  148. </DataTrigger>
  149. <DataTrigger Binding="{Binding FoupType}" Value="OpenCassette">
  150. <Setter Property="ContentTemplate" Value="{StaticResource opencassette}" />
  151. </DataTrigger>
  152. <DataTrigger Binding="{Binding FoupType}" Value="OpenCassetteNoReadID">
  153. <Setter Property="ContentTemplate" Value="{StaticResource opencassettenoreadid}" />
  154. </DataTrigger>
  155. <DataTrigger Binding="{Binding FoupType}" Value="Nothing">
  156. <Setter Property="ContentTemplate" Value="{StaticResource nothing}" />
  157. </DataTrigger>
  158. </Style.Triggers>
  159. </Style>
  160. </ContentControl.Style>
  161. </ContentControl>
  162. </DataTemplate>
  163. </ItemsControl.ItemTemplate>
  164. </ItemsControl>
  165. </ScrollViewer>
  166. </Grid>
  167. </UserControl>