FoupItem.xaml 6.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. <UserControl x:Class="EfemUI.Controls.FoupItem"
  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:EfemUI.Controls"
  7. xmlns:local1="clr-namespace:Aitex.Sorter.UI.Controls;assembly=Aitex.Sorter.UI"
  8. mc:Ignorable="d"
  9. d:DesignHeight="300" d:DesignWidth="300" PreviewKeyDown="UserControl_PreviewKeyDown">
  10. <UserControl.Resources>
  11. <local1:FoupModeConverter x:Key="FoupModeConverter" />
  12. <local:SlotItemIndexConverter x:Key="slotItemIndexConverter" />
  13. <local:ShowSlotItemIndexConverter x:Key="showSlotItemIndexConverter" />
  14. <local:SlotItemIndexConverter2 x:Key="slotItemIndexConverter2" />
  15. <local:SlotItemVisibilityConverter x:Key="slotItemVisibilityConverter" />
  16. </UserControl.Resources>
  17. <Border x:Name="root" Height="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ActualHeight}" Width="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ActualWidth}" Background="{Binding CarrierMode,Converter={StaticResource FoupModeConverter}}">
  18. <Grid>
  19. <Grid.RowDefinitions>
  20. <RowDefinition Height="25" />
  21. <RowDefinition Height="*" />
  22. <RowDefinition Height="8" />
  23. </Grid.RowDefinitions>
  24. <TextBlock Grid.Row="0" Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center" Text="{Binding Title}" FontSize="18" FontWeight="Bold"/>
  25. <ItemsControl Grid.Column="1" Grid.Row="1" x:Name="Slot" ItemsSource="{Binding Slots}" AlternationCount="26">
  26. <ItemsControl.Resources>
  27. <Style TargetType="{x:Type local1:WaferPro}">
  28. <EventSetter Event="local1:WaferPro.PreviewMouseLeftButtonDown" Handler="lbItem_PreviewMouseLeftButtonDown" />
  29. <EventSetter Event="local1:WaferPro.PreviewMouseMove" Handler="lbItem_PreviewMouseMove" />
  30. <EventSetter Event="Drop" Handler="Slot_Drop" />
  31. </Style>
  32. </ItemsControl.Resources>
  33. <ItemsControl.ItemTemplate>
  34. <DataTemplate>
  35. <Grid>
  36. <Grid.ColumnDefinitions>
  37. <ColumnDefinition Width="155" />
  38. <ColumnDefinition Width="9" />
  39. </Grid.ColumnDefinitions>
  40. <local1:WaferProNew IsEnableTextMenu1="{Binding ElementName=Slot,Path=DataContext.IsEnableTextMenu}"
  41. WaferIDDisplayMode="WaferOrigin" Height="9.5"
  42. ShowSlotIndex="{Binding ElementName=Slot,Path=DataContext.ShowSlotsIndex}"
  43. WaferItem="{Binding}" Station="{Binding ElementName=Slot, Path=DataContext.Station}"
  44. WaferTransferCommand ="{Binding ElementName=Slot, Path=DataContext.WaferTransferCommand}"
  45. WaferTransferOptionCommand="{Binding ElementName=Slot, Path=DataContext.WaferTransferOptionCommand}"
  46. ShowControl="{Binding ElementName=Slot,Path=DataContext.ShowControl}">
  47. <local1:WaferProNew.Slot>
  48. <MultiBinding Converter="{StaticResource slotItemIndexConverter}">
  49. <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="(ItemsControl.AlternationIndex)" />
  50. <Binding ElementName="Slot" Path="DataContext.SlotCount" />
  51. <Binding ElementName="Slot" Path="DataContext.IsSlotShowOpposite" />
  52. </MultiBinding>
  53. </local1:WaferProNew.Slot>
  54. <local1:WaferProNew.ShowSlot>
  55. <MultiBinding Converter="{StaticResource showSlotItemIndexConverter}">
  56. <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="(ItemsControl.AlternationIndex)" />
  57. <Binding ElementName="Slot" Path="DataContext.SlotCount" />
  58. </MultiBinding>
  59. </local1:WaferProNew.ShowSlot>
  60. <!--<local:Wafer.Slot>
  61. <MultiBinding Converter="{StaticResource waferIDConverter }">
  62. <Binding />
  63. <Binding ElementName="Slot" Path="ItemsSource" />
  64. </MultiBinding>
  65. </local:Wafer.Slot>-->
  66. </local1:WaferProNew>
  67. <TextBlock Grid.Row="0" Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="8" FontWeight="Bold">
  68. <TextBlock.Text>
  69. <MultiBinding Converter="{StaticResource slotItemIndexConverter2}">
  70. <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="(ItemsControl.AlternationIndex)" />
  71. <Binding ElementName="Slot" Path="DataContext.SlotCount" />
  72. <Binding ElementName="Slot" Path="DataContext.IsSlotShowOpposite" />
  73. </MultiBinding>
  74. </TextBlock.Text>
  75. <!--<TextBlock.Visibility>
  76. <MultiBinding Converter="{StaticResource slotItemVisibilityConverter}">
  77. <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="(ItemsControl.AlternationIndex)" />
  78. <Binding ElementName="Slot" Path="DataContext.SlotCount" />
  79. </MultiBinding>
  80. </TextBlock.Visibility>-->
  81. </TextBlock>
  82. </Grid>
  83. </DataTemplate>
  84. </ItemsControl.ItemTemplate>
  85. </ItemsControl>
  86. </Grid>
  87. </Border>
  88. </UserControl>