WaferHistoryDBView.xaml 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287
  1. <UserControl x:Class="VirgoUI.Client.Models.DataLog.WaferHistory.WaferHistoryDBView"
  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:wfi ="clr-namespace:System.Windows.Forms.Integration;assembly=WindowsFormsIntegration"
  6. xmlns:wf ="clr-namespace:System.Windows.Forms;assembly=System.Windows.Forms"
  7. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  8. xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
  9. xmlns:toolkit="http://schemas.xceed.com/wpf/xaml/toolkit"
  10. xmlns:s="http://schemas.abtsoftware.co.uk/scichart"
  11. xmlns:waferHistory="clr-namespace:VirgoUI.Client.Models.DataLog.WaferHistory"
  12. mc:Ignorable="d"
  13. d:DesignHeight="450" d:DesignWidth="1800">
  14. <Grid x:Name="root">
  15. <Grid.Resources>
  16. <waferHistory:HideMinTimeConverters x:Key="HideMinTimeConvert"/>
  17. <waferHistory:MinTime2BoolConverters x:Key="MinTime2BoolConverter"/>
  18. <waferHistory:RecipeStepNull2Empty x:Key="RecipeStepNull2Empty"/>
  19. <Grid x:Key="LotLayout">
  20. <DataGrid ItemsSource="{Binding Lots}" IsReadOnly="True" AutoGenerateColumns="False" RowHeight="25"
  21. CanUserAddRows="False" CanUserResizeRows="False" CanUserResizeColumns="True" FontFamily="Arial" FontSize="14">
  22. <DataGrid.Columns>
  23. <DataGridTextColumn Header="Lot ID" Width="180*" Binding="{Binding LotID}" />
  24. <DataGridTextColumn Header="LP Position" Width="100*" Binding="{Binding InputPort}" />
  25. <DataGridTextColumn Header="Start Time" Width="150*" Binding="{Binding StartTime,Converter={StaticResource HideMinTimeConvert}}" />
  26. <DataGridTextColumn Header="End Time" Width="150*" Binding="{Binding EndTime,Converter={StaticResource HideMinTimeConvert}}" />
  27. <DataGridTextColumn Header="Duration" Width="75*" Binding="{Binding Duration}" />
  28. <DataGridTextColumn Header="Wafer Count" Width="100*" Binding="{Binding WaferCount}" />
  29. <DataGridTextColumn Header="Fault Wafer Count" Width="150*" Binding="{Binding FaultWaferCount}" />
  30. <DataGridTemplateColumn Header="Lots Data" Width="100*">
  31. <DataGridTemplateColumn.CellTemplate>
  32. <DataTemplate>
  33. <Button Content="To Slot" Margin="0" Height="22" VerticalContentAlignment="Center" FontSize="12">
  34. <i:Interaction.Triggers>
  35. <i:EventTrigger EventName="Click">
  36. <i:InvokeCommandAction Command="{Binding DataContext.ToChartCommand,ElementName=root}" CommandParameter="{Binding }" />
  37. </i:EventTrigger>
  38. </i:Interaction.Triggers>
  39. </Button>
  40. </DataTemplate>
  41. </DataGridTemplateColumn.CellTemplate>
  42. </DataGridTemplateColumn>
  43. </DataGrid.Columns>
  44. </DataGrid>
  45. </Grid>
  46. <Grid x:Key="WaferLayout">
  47. <DataGrid ItemsSource="{Binding Wafers}" IsReadOnly="True" AutoGenerateColumns="False" RowHeight="25"
  48. CanUserAddRows="False" CanUserResizeRows="False" CanUserResizeColumns="True" FontFamily="Arial" FontSize="14" >
  49. <DataGrid.Columns>
  50. <DataGridTextColumn Header="Lot ID" Width="100*" Binding="{Binding LotID}" />
  51. <DataGridTextColumn Header="Slot ID" Width="100*" Binding="{Binding SlotID}" />
  52. <DataGridTextColumn Header="Arrive Time" Width="150*" Binding="{Binding StartTime,Converter={StaticResource HideMinTimeConvert}}" />
  53. <DataGridTextColumn Header="Remove Time" Width="150*" Binding="{Binding EndTime,Converter={StaticResource HideMinTimeConvert}}" />
  54. <DataGridTextColumn Header="Duration" Width="75*" Binding="{Binding Duration}" />
  55. <DataGridTextColumn Header="Sequence" Width="200*" Binding="{Binding Sequence}" />
  56. <DataGridTextColumn Header="Status" Width="200*" Binding="{Binding Status}" />
  57. <DataGridTemplateColumn Header="Chart" Width="100*">
  58. <DataGridTemplateColumn.CellTemplate>
  59. <DataTemplate>
  60. <Button Content="To Chart" IsEnabled="{Binding EndTime,Converter={StaticResource MinTime2BoolConverter }}" Margin="0" Height="22" VerticalContentAlignment="Center" FontSize="12">
  61. <i:Interaction.Triggers>
  62. <i:EventTrigger EventName="Click">
  63. <i:InvokeCommandAction Command="{Binding DataContext.ToChartCommand,ElementName=root}" CommandParameter="{Binding }" />
  64. </i:EventTrigger>
  65. </i:Interaction.Triggers>
  66. </Button>
  67. </DataTemplate>
  68. </DataGridTemplateColumn.CellTemplate>
  69. </DataGridTemplateColumn>
  70. </DataGrid.Columns>
  71. </DataGrid>
  72. </Grid>
  73. <Grid x:Key="MovementLayout">
  74. <Grid.RowDefinitions>
  75. <RowDefinition Height="20*"/>
  76. <RowDefinition Height="50*"/>
  77. </Grid.RowDefinitions>
  78. <DataGrid ItemsSource="{Binding Recipes}" IsReadOnly="True" AutoGenerateColumns="False" RowHeight="25"
  79. CanUserAddRows="False" CanUserResizeRows="False" CanUserResizeColumns="True" FontFamily="Arial" FontSize="14" >
  80. <DataGrid.Columns>
  81. <DataGridTextColumn Header="Name" Width="200*" Binding="{Binding Recipe}" />
  82. <DataGridTextColumn Header="StartTime" Width="150*" Binding="{Binding StartTime,Converter={StaticResource HideMinTimeConvert}}" />
  83. <DataGridTextColumn Header="EndTime" Width="150*" Binding="{Binding EndTime,Converter={StaticResource HideMinTimeConvert}}" />
  84. <DataGridTextColumn Header="Chamber" Width="100*" Binding="{Binding Chamber}" />
  85. <DataGridTextColumn Header="SettingTime" Width="150*" Binding="{Binding SettingTime}" />
  86. <DataGridTextColumn Header="ActualTime" Width="150*" Binding="{Binding ActualTime}" />
  87. <DataGridTemplateColumn Header="Chart" Width="100*">
  88. <DataGridTemplateColumn.CellTemplate>
  89. <DataTemplate>
  90. <Button Content="To Chart" Margin="0" Height="22" VerticalContentAlignment="Center" FontSize="12">
  91. <i:Interaction.Triggers>
  92. <i:EventTrigger EventName="Click">
  93. <i:InvokeCommandAction Command="{Binding DataContext.ToChartCommand,ElementName=root}" CommandParameter="{Binding StartTime}" />
  94. </i:EventTrigger>
  95. </i:Interaction.Triggers>
  96. </Button>
  97. </DataTemplate>
  98. </DataGridTemplateColumn.CellTemplate>
  99. </DataGridTemplateColumn>
  100. </DataGrid.Columns>
  101. </DataGrid>
  102. <TabControl Grid.Row="1">
  103. <TabItem Header="Movements">
  104. <DataGrid ItemsSource="{Binding Movements}" IsReadOnly="True" AutoGenerateColumns="False" RowHeight="25"
  105. CanUserAddRows="False" CanUserResizeRows="False" CanUserResizeColumns="True" FontFamily="Arial" FontSize="14">
  106. <DataGrid.Columns>
  107. <DataGridTextColumn Header="Source" Width="200*" Binding="{Binding Source}" />
  108. <DataGridTextColumn Header="Destination" Width="200*" Binding="{Binding Destination}" />
  109. <DataGridTextColumn Header="Time" Width="200*" Binding="{Binding InTime,Converter={StaticResource HideMinTimeConvert}}" />
  110. </DataGrid.Columns>
  111. </DataGrid>
  112. </TabItem>
  113. </TabControl>
  114. </Grid>
  115. <Grid x:Key="RecipeLayout">
  116. <Grid.RowDefinitions>
  117. <RowDefinition Height="20*" />
  118. <RowDefinition Height="80*" />
  119. </Grid.RowDefinitions>
  120. <Border BorderBrush="{DynamicResource Tab_BD}" BorderThickness="1" Background="{DynamicResource Tab_BG}">
  121. <Grid DataContext="{Binding Recipe}" Background="{DynamicResource DataGrid_BG_First}">
  122. <Grid.ColumnDefinitions>
  123. <ColumnDefinition Width="10*"/>
  124. <ColumnDefinition Width="10*"/>
  125. <ColumnDefinition Width="10*"/>
  126. <ColumnDefinition Width="10*"/>
  127. <ColumnDefinition Width="10*"/>
  128. <ColumnDefinition Width="10*"/>
  129. </Grid.ColumnDefinitions>
  130. <Grid.RowDefinitions>
  131. <RowDefinition Height="30"/>
  132. <RowDefinition Height="30"/>
  133. </Grid.RowDefinitions>
  134. <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,1" Grid.Column="0" Background="{DynamicResource Table_BG_Title}" Grid.Row="0" Padding="5,1">
  135. <TextBlock Text="Name" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" FontSize="12" FontFamily="Arial" VerticalAlignment="Center" HorizontalAlignment="Center"/>
  136. </Border>
  137. <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,1" Grid.Column="1" Background="{DynamicResource Table_BG_Title}" Grid.Row="0" Padding="5,1">
  138. <TextBlock Text="StartTime" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" FontSize="12" FontFamily="Arial" VerticalAlignment="Center" HorizontalAlignment="Center"/>
  139. </Border>
  140. <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,1" Grid.Column="2" Background="{DynamicResource Table_BG_Title}" Grid.Row="0" Padding="5,1">
  141. <TextBlock Text="EndTime" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" FontSize="12" FontFamily="Arial" VerticalAlignment="Center" HorizontalAlignment="Center"/>
  142. </Border>
  143. <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,1" Grid.Column="3" Background="{DynamicResource Table_BG_Title}" Grid.Row="0" Padding="5,1">
  144. <TextBlock Text="Chamber" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" FontSize="12" FontFamily="Arial" VerticalAlignment="Center" HorizontalAlignment="Center"/>
  145. </Border>
  146. <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,1" Grid.Column="4" Background="{DynamicResource Table_BG_Title}" Grid.Row="0" Padding="5,1">
  147. <TextBlock Text="SettingTime" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" FontSize="12" FontFamily="Arial" VerticalAlignment="Center" HorizontalAlignment="Center"/>
  148. </Border>
  149. <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,0,1" Grid.Column="5" Background="{DynamicResource Table_BG_Title}" Grid.Row="0" Padding="5,1">
  150. <TextBlock Text="ActualTime" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" FontSize="12" FontFamily="Arial" VerticalAlignment="Center" HorizontalAlignment="Center"/>
  151. </Border>
  152. <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,1" Background="{DynamicResource Table_BG_Content}" Grid.Column="0" Grid.Row="1" Padding="5,1">
  153. <TextBlock Text="{Binding Recipe}" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" FontSize="12" FontFamily="Arial" VerticalAlignment="Center" HorizontalAlignment="Center"/>
  154. </Border>
  155. <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,1" Background="{DynamicResource Table_BG_Content}" Grid.Column="1" Grid.Row="1" Padding="5,1">
  156. <TextBlock Text="{Binding StartTime,Converter={StaticResource HideMinTimeConvert}}" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" FontSize="12" FontFamily="Arial" VerticalAlignment="Center" HorizontalAlignment="Center"/>
  157. </Border>
  158. <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,1" Background="{DynamicResource Table_BG_Content}" Grid.Column="2" Grid.Row="1" Padding="5,1">
  159. <TextBlock Text="{Binding EndTime,Converter={StaticResource HideMinTimeConvert}}" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" FontSize="12" FontFamily="Arial" VerticalAlignment="Center" HorizontalAlignment="Center"/>
  160. </Border>
  161. <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,1" Background="{DynamicResource Table_BG_Content}" Grid.Column="3" Grid.Row="1" Padding="5,1">
  162. <TextBlock Text="{Binding Chamber}" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" FontSize="12" FontFamily="Arial" VerticalAlignment="Center" HorizontalAlignment="Center"/>
  163. </Border>
  164. <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,1" Background="{DynamicResource Table_BG_Content}" Grid.Column="4" Grid.Row="1" Padding="5,1">
  165. <TextBlock Text="{Binding SettingTime}" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" FontSize="12" FontFamily="Arial" VerticalAlignment="Center" HorizontalAlignment="Center"/>
  166. </Border>
  167. <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,0,1" Background="{DynamicResource Table_BG_Content}" Grid.Column="5" Grid.Row="1" Padding="5,1">
  168. <TextBlock Text="{Binding ActualTime}" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" FontSize="12" FontFamily="Arial" VerticalAlignment="Center" HorizontalAlignment="Center"/>
  169. </Border>
  170. </Grid>
  171. </Border>
  172. <TabControl Grid.Row="1" >
  173. <TabItem Header="Steps">
  174. <DataGrid ItemsSource="{Binding Recipe.Steps, Converter={StaticResource RecipeStepNull2Empty}}" IsReadOnly="True" AutoGenerateColumns="False"
  175. CanUserAddRows="False" CanUserResizeRows="False" CanUserResizeColumns="True" FontFamily="Arial" FontSize="14" >
  176. <DataGrid.Columns>
  177. <DataGridTextColumn Header="#" Binding="{Binding No}" />
  178. <DataGridTextColumn Header="Name" Width="200*" Binding="{Binding Name}" />
  179. <DataGridTextColumn Header="Start Time" Width="200*" Binding="{Binding StartTime,Converter={StaticResource HideMinTimeConvert}}" />
  180. <DataGridTextColumn Header="End Time" Width="200*" Binding="{Binding EndTime,Converter={StaticResource HideMinTimeConvert}}" />
  181. <DataGridTextColumn Header="Actual Time" Width="100*" Binding="{Binding ActualTime}" />
  182. <DataGridTextColumn Header="Setting Time" Width="100*" Binding="{Binding SettingTime}" />
  183. </DataGrid.Columns>
  184. </DataGrid>
  185. </TabItem>
  186. <TabItem Header="FDC">
  187. <DataGrid ItemsSource="{Binding Recipe.Fdcs}" IsReadOnly="True" AutoGenerateColumns="False"
  188. CanUserAddRows="False" CanUserResizeRows="False" CanUserResizeColumns="True" FontFamily="Arial" FontSize="14" >
  189. <DataGrid.Columns>
  190. <DataGridTextColumn Header="#" Binding="{Binding StepNumber}" />
  191. <DataGridTextColumn Header="Name" Width="200" Binding="{Binding Name}" />
  192. <DataGridTextColumn Header="SetPoint" Width="100" Binding="{Binding SetPoint}" />
  193. <DataGridTextColumn Header="Count" Width="50" Binding="{Binding SampleCount}" />
  194. <DataGridTextColumn Header="Min" Width="100" Binding="{Binding MinValue}" />
  195. <DataGridTextColumn Header="Max" Width="100" Binding="{Binding MaxValue}" />
  196. <DataGridTextColumn Header="Mean" Width="100" Binding="{Binding MeanValue}" />
  197. <DataGridTextColumn Header="Std" Width="100" Binding="{Binding StdValue}" />
  198. </DataGrid.Columns>
  199. </DataGrid>
  200. </TabItem>
  201. </TabControl>
  202. </Grid>
  203. <waferHistory:HistoryLayoutSelectorConverter x:Key="HistoryLayoutSelectorConverter" WaferLayout="{StaticResource WaferLayout}"
  204. MovementLayout="{StaticResource MovementLayout}"
  205. RecipeLayout="{StaticResource RecipeLayout}"
  206. LotsLayout="{StaticResource LotLayout}"/>
  207. </Grid.Resources>
  208. <Grid.RowDefinitions>
  209. <RowDefinition Height="40"></RowDefinition>
  210. <RowDefinition Height="700"></RowDefinition>
  211. </Grid.RowDefinitions>
  212. <StackPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Orientation="Horizontal" Margin="2,10,2,2">
  213. <Label Content="Start_Time:"/>
  214. <wfi:WindowsFormsHost Margin="5,0,0,0" FontSize="14" FontFamily="Arial" Width="170" Height="22" VerticalAlignment="Center">
  215. <wf:DateTimePicker x:Name="wfTimeFrom" Value="2011-8-1" CustomFormat="yyyy/MM/dd HH:mm:ss" Format="Custom"></wf:DateTimePicker>
  216. </wfi:WindowsFormsHost>
  217. <Label Content="End_Time:"/>
  218. <wfi:WindowsFormsHost Margin="5,0,0,0" FontSize="14" FontFamily="Arial" Width="170" Height="22" VerticalAlignment="Center">
  219. <wf:DateTimePicker x:Name="wfTimeTo" Value="2011-8-1" CustomFormat="yyyy/MM/dd HH:mm:ss" Format="Custom"></wf:DateTimePicker>
  220. </wfi:WindowsFormsHost>
  221. <Label Content="LotName:" />
  222. <TextBox Width="200" Text="{Binding KeyWord}" />
  223. <Button Content="Query" Width="120" Margin="4,2,4,2" Command="{Binding QueryCommand}"/>
  224. </StackPanel>
  225. <Grid Grid.Row="1" Grid.Column="0" >
  226. <Grid.ColumnDefinitions>
  227. <ColumnDefinition Width="350" />
  228. <ColumnDefinition Width="*" />
  229. </Grid.ColumnDefinitions>
  230. <Border Grid.Row="0" Margin="0,5,13,0" BorderBrush="{DynamicResource Tab_BD}" BorderThickness="1" Background="{DynamicResource Tab_BG}">
  231. <ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
  232. <TreeView ItemsSource="{Binding HistoryData}" SelectedValuePath="Data">
  233. <TreeView.ItemContainerStyle>
  234. <Style TargetType="{x:Type TreeViewItem}">
  235. <Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}" />
  236. <Setter Property="FontWeight" Value="Normal" />
  237. <Setter Property="IsSelected" Value="{Binding this.IsSelected}"/>
  238. <Style.Triggers>
  239. <Trigger Property="IsSelected" Value="True">
  240. <Setter Property="FontWeight" Value="Bold"/>
  241. </Trigger>
  242. </Style.Triggers>
  243. </Style>
  244. </TreeView.ItemContainerStyle>
  245. <TreeView.ItemTemplate>
  246. <HierarchicalDataTemplate ItemsSource="{Binding SubItems}">
  247. <TextBlock Text="{Binding Data.ItemInfo}">
  248. <i:Interaction.Triggers>
  249. <i:EventTrigger EventName="MouseLeftButtonDown">
  250. <i:InvokeCommandAction Command="{Binding DataContext.SelectionChangedCommand,ElementName=root,UpdateSourceTrigger=PropertyChanged}" CommandParameter="{Binding Data}" />
  251. </i:EventTrigger>
  252. </i:Interaction.Triggers>
  253. </TextBlock>
  254. </HierarchicalDataTemplate>
  255. </TreeView.ItemTemplate>
  256. </TreeView>
  257. </ScrollViewer>
  258. </Border>
  259. <GridSplitter Grid.Column="0" Width="10" HorizontalAlignment="Right" Background="Transparent" VerticalAlignment="Stretch" Style="{DynamicResource VerticalGridSplitterStyle}">
  260. </GridSplitter>
  261. <Grid Grid.Row="0" Grid.Column="1">
  262. <ContentControl Content="{Binding SelectedItem,UpdateSourceTrigger=PropertyChanged, Converter={StaticResource HistoryLayoutSelectorConverter}}"/>
  263. </Grid>
  264. </Grid>
  265. </Grid>
  266. </UserControl>