RobotControl.xaml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. <uc:ViewModelControl x:Class="Aitex.Sorter.UI.Controls.RobotControl"
  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.Controls"
  7. xmlns:uc="clr-namespace:Aitex.Sorter.UI.Controls"
  8. xmlns:Common="clr-namespace:Aitex.Sorter.Common;assembly=MECF.Framework.Common"
  9. xmlns:ctrlCommon="clr-namespace:Aitex.Sorter.UI.Controls.Common"
  10. xmlns:s="clr-namespace:System;assembly=mscorlib"
  11. xmlns:equipment="clr-namespace:MECF.Framework.Common.Equipment;assembly=MECF.Framework.Common"
  12. xmlns:common="clr-namespace:Aitex.Sorter.Common;assembly=Aitex.Sorter.Common"
  13. xmlns:converter="clr-namespace:Aitex.Sorter.UI.Converter"
  14. xmlns:converters="clr-namespace:Aitex.Core.UI.Converters;assembly=MECF.Framework.UI.Core"
  15. mc:Ignorable="d" x:Name="self"
  16. d:DesignHeight="560" d:DesignWidth="560">
  17. <UserControl.Resources>
  18. <s:Int32 x:Key="MoveOption" >0</s:Int32>
  19. <Style TargetType="Label" BasedOn="{StaticResource {x:Type Label}}">
  20. <Setter Property="VerticalAlignment" Value="Center" />
  21. <Setter Property="HorizontalAlignment" Value="Center" />
  22. </Style>
  23. <local:TargetSlotConverter x:Key="TargetSlotConverter" />
  24. <local:TargetKeyValueConverter x:Key="TargetKeyValueConverter"/>
  25. <converters:bool2VisibilityConverter x:Key="bool2VisibilityConvert"/>
  26. </UserControl.Resources>
  27. <Grid x:Name="root">
  28. <uc:HeaderPanel Grid.Row="0" Width="560" Height="560" HorizontalAlignment="left" VerticalAlignment="Top" Header="Robot">
  29. <Grid Height="600" ctrlCommon:GridHelper.Column0="{StaticResource Table_BG_Title}" ctrlCommon:GridHelper.Column1="Transparent" ctrlCommon:GridHelper.Column2="{StaticResource Table_BG_Title}" ctrlCommon:GridHelper.Column3="Transparent" VerticalAlignment="Top">
  30. <Grid.ColumnDefinitions>
  31. <ColumnDefinition Width="1.2*" />
  32. <ColumnDefinition Width="*"/>
  33. <ColumnDefinition Width="1.2*"/>
  34. <ColumnDefinition Width="*"/>
  35. </Grid.ColumnDefinitions>
  36. <Grid.RowDefinitions>
  37. <RowDefinition Height="*" />
  38. <RowDefinition Height="*" />
  39. <RowDefinition Height="1.2*" />
  40. <RowDefinition Height="*" />
  41. <RowDefinition Height="*" />
  42. <RowDefinition Height="*" />
  43. <RowDefinition Height="*" />
  44. </Grid.RowDefinitions>
  45. <Label Grid.Row="0" Grid.Column="0" Content="{DynamicResource GlobalLableRobotStatus}" />
  46. <Label Content="{Binding Status}" Grid.Row="0" Grid.Column="1" />
  47. <Label Grid.Row="0" Grid.Column="2" Content="{DynamicResource GlobalLableRobotErrorCode}" />
  48. <Label Content="{Binding ErrorCode}" Grid.Row="0" Grid.Column="3" />
  49. <Label Grid.Row="1" Grid.Column="0" Content="{DynamicResource GlobalLableRobotBlade1Target}" />
  50. <Label Content="{Binding RobotBlade1Traget}" Grid.Row="1" Grid.Column="1" />
  51. <Label Grid.Row="1" Grid.Column="2" Content="{DynamicResource GlobalLableRobotBlade2Target}" />
  52. <Label Content="{Binding RobotBlade2Traget}" Grid.Row="1" Grid.Column="3" />
  53. <Grid Grid.Row="2" VerticalAlignment="Center" Grid.ColumnSpan="4">
  54. <Grid.RowDefinitions>
  55. <RowDefinition Height="*" />
  56. <RowDefinition Height="*" />
  57. </Grid.RowDefinitions>
  58. <StackPanel Orientation="Horizontal" Grid.Row="0" Margin="140,0,0,0">
  59. <Button Content="{DynamicResource GlobalBtnRobotHome}" Command="{Binding Command}"
  60. ctrlCommon:CommandHelper.CommandName="{x:Static common:DeviceOperationName.RobotHome}"
  61. ctrlCommon:CommandHelper.Target="{x:Static common:DeviceName.Robot}" />
  62. <Button Content="{DynamicResource GlobalBtnRobotReset}" Command="{Binding Command}" ctrlCommon:CommandHelper.CommandName="{x:Static common:DeviceOperationName.RobotReset}" ctrlCommon:CommandHelper.Target="{x:Static common:DeviceName.Robot}" />
  63. <Button Content="{DynamicResource GlobalBtnRobotStop}" Command="{Binding Command}" ctrlCommon:CommandHelper.CommandName="{x:Static common:DeviceOperationName.RobotStop}" ctrlCommon:CommandHelper.Target="{x:Static common:DeviceName.Robot}"/>
  64. </StackPanel>
  65. <Grid Grid.Row="1">
  66. <Grid.ColumnDefinitions>
  67. <ColumnDefinition Width="140" />
  68. <ColumnDefinition Width="*" />
  69. </Grid.ColumnDefinitions>
  70. <ComboBox x:Name="cboGripHand" Margin="4" ItemsSource="{Binding Hands}"/>
  71. <StackPanel Grid.Column="1" Orientation="Horizontal">
  72. <Button Content="{DynamicResource GlobalBtnRobotGrip}" Command="{Binding Command}" ctrlCommon:CommandHelper.CommandName="{x:Static common:DeviceOperationName.RobotGrip}" ctrlCommon:CommandHelper.Target="{x:Static common:DeviceName.Robot}" ctrlCommon:CommandHelper.Parameter1="{Binding SelectedIndex, ElementName=cboGripHand}"/>
  73. <Button Content="{DynamicResource GlobalBtnRobotUngrip}" Command="{Binding Command}" ctrlCommon:CommandHelper.CommandName="{x:Static common:DeviceOperationName.RobotRelease}" ctrlCommon:CommandHelper.Target="{x:Static common:DeviceName.Robot}" ctrlCommon:CommandHelper.Parameter1="{Binding SelectedIndex, ElementName=cboGripHand}"/>
  74. </StackPanel>
  75. </Grid>
  76. </Grid>
  77. <Label Content="{DynamicResource GlobalLableRobotSpeed}" Grid.Row="3" Grid.Column="0"/>
  78. <StackPanel Orientation="Horizontal" Grid.Row="3" Grid.Column="1" Grid.ColumnSpan="3" >
  79. <Button Command="{Binding SetSpeedCommand}" ctrlCommon:CommandHelper.CommandName="{x:Static common:OperationName.SetSpeed}" ctrlCommon:CommandHelper.Parameter1="3"
  80. Margin="8,0,0,0" Content="{DynamicResource GlobalBtnRobotLow}" VerticalAlignment="Center" />
  81. <Button Command="{Binding SetSpeedCommand}" ctrlCommon:CommandHelper.CommandName="{x:Static common:OperationName.SetSpeed}" ctrlCommon:CommandHelper.Parameter1="2"
  82. Margin="8,0,0,0" Content="{DynamicResource GlobalBtnRobotMedium}" VerticalAlignment="Center" />
  83. <Button Command="{Binding SetSpeedCommand}" ctrlCommon:CommandHelper.CommandName="{x:Static common:OperationName.SetSpeed}" ctrlCommon:CommandHelper.Parameter1="1"
  84. Margin="8,0,0,0" Content="{DynamicResource GlobalBtnRobotHigh}" VerticalAlignment="Center"
  85. Visibility="{Binding ElementName=self, Path=EnableHighSpeed, Converter={StaticResource bool2VisibilityConvert}}"/>
  86. </StackPanel>
  87. <Grid Grid.Row="4" Grid.RowSpan="2" Grid.ColumnSpan="4">
  88. <Grid.ColumnDefinitions>
  89. <ColumnDefinition Width="*" />
  90. <ColumnDefinition Width="*" />
  91. <ColumnDefinition Width="*" />
  92. <ColumnDefinition Width="*" />
  93. </Grid.ColumnDefinitions>
  94. <Grid.RowDefinitions>
  95. <RowDefinition Height="*" />
  96. <RowDefinition Height="*" />
  97. <RowDefinition Height="*" />
  98. </Grid.RowDefinitions>
  99. <ComboBox x:Name="cboPickTarget" Grid.Row="0" Grid.Column="0" Margin="4" ItemsSource="{Binding Target}" DisplayMemberPath="Key" SelectedValuePath="Value"/>
  100. <ComboBox x:Name="cboPickSlot" DisplayMemberPath="Key" SelectedValuePath="Value" Grid.Row="0" Grid.Column="1" Margin="4" ItemsSource="{Binding SelectedValue, ElementName=cboPickTarget,Converter={StaticResource TargetSlotConverter}}" IsEnabled="{Binding SelectedItem, ElementName=cboPickTarget, Converter={StaticResource valueNotMatchConverter}}"/>
  101. <ComboBox x:Name="cboPickHand" Grid.Row="0" Grid.Column="2" Margin="4" ItemsSource="{Binding Hands}"/>
  102. <Button Grid.Row="0" Grid.Column="3" Content="{DynamicResource GlobalBtnRobotPick}" Command="{Binding OperationCommand}" ctrlCommon:CommandHelper.CommandName="{x:Static common:OperationName.MoveWafer}" ctrlCommon:CommandHelper.Target="{x:Static common:DeviceName.Robot}" ctrlCommon:CommandHelper.Parameter1="{x:Static Common:MoveType.Move}" ctrlCommon:CommandHelper.Parameter2="{StaticResource MoveOption}" ctrlCommon:CommandHelper.Parameter3="{Binding SelectedItem, ElementName=cboPickHand}" ctrlCommon:CommandHelper.Parameter4="{Binding SelectedItem, ElementName=cboPickTarget, Converter={StaticResource TargetKeyValueConverter}}" ctrlCommon:CommandHelper.Parameter5="{Binding SelectedValue ,ElementName=cboPickSlot}" ctrlCommon:CommandHelper.Parameter6="{x:Static equipment:ModuleName.Robot}" ctrlCommon:CommandHelper.Parameter7="{Binding SelectedIndex, ElementName=cboPickHand}"/>
  103. <ComboBox x:Name="cboPlaceTarget" Grid.Row="1" Grid.Column="0" Margin="4" ItemsSource="{Binding Target}" DisplayMemberPath="Key" SelectedValuePath="Value"/>
  104. <ComboBox x:Name="cboPlaceSlot" DisplayMemberPath="Key" SelectedValuePath="Value" Grid.Row="1" Grid.Column="1" Margin="4" ItemsSource="{Binding SelectedValue, ElementName=cboPlaceTarget,Converter={StaticResource TargetSlotConverter}}" IsEnabled="{Binding SelectedItem, ElementName=cboPlaceTarget, Converter={StaticResource valueNotMatchConverter}}"/>
  105. <ComboBox x:Name="cboPlaceHand" Grid.Row="1" Grid.Column="2" Margin="4" ItemsSource="{Binding Hands}"/>
  106. <Button Grid.Row="1" Grid.Column="3" Content="{DynamicResource GlobalBtnRobotPlace}" Command="{Binding OperationCommand}"
  107. ctrlCommon:CommandHelper.CommandName="{x:Static common:OperationName.MoveWafer}"
  108. ctrlCommon:CommandHelper.Target="{x:Static common:DeviceName.Robot}"
  109. ctrlCommon:CommandHelper.Parameter1="{x:Static Common:MoveType.Move}"
  110. ctrlCommon:CommandHelper.Parameter2="{StaticResource MoveOption}"
  111. ctrlCommon:CommandHelper.Parameter3="{Binding SelectedItem, ElementName=cboPlaceHand}"
  112. ctrlCommon:CommandHelper.Parameter4="{x:Static equipment:ModuleName.Robot}"
  113. ctrlCommon:CommandHelper.Parameter5="{Binding SelectedIndex, ElementName=cboPlaceHand}"
  114. ctrlCommon:CommandHelper.Parameter6="{Binding SelectedItem, ElementName=cboPlaceTarget, Converter={StaticResource TargetKeyValueConverter}}"
  115. ctrlCommon:CommandHelper.Parameter7="{Binding SelectedValue ,ElementName=cboPlaceSlot}"/>
  116. <!--<ComboBox x:Name="cboGotoTarget" Grid.Row="2" Grid.Column="0" Margin="4" ItemsSource="{Binding Target}" DisplayMemberPath="Key" SelectedValuePath="Value"/>
  117. <ComboBox x:Name="cboGotoSlot" DisplayMemberPath="Key" SelectedValuePath="Value" Grid.Row="2" Grid.Column="1" Margin="4" ItemsSource="{Binding SelectedValue, ElementName=cboGotoTarget,Converter={StaticResource TargetSlotConverter}}" IsEnabled="{Binding SelectedItem, ElementName=cboGotoTarget, Converter={StaticResource valueNotMatchConverter}}"/>
  118. <ComboBox x:Name="cboGotoHand" Grid.Row="2" Grid.Column="2" Margin="4" ItemsSource="{Binding Hands}"/>
  119. <Button Grid.Row="2" Grid.Column="3" Content="Go To" Command="{Binding Command}" ctrlCommon:CommandHelper.CommandName="{x:Static common:DeviceOperationName.RobotGoto}" ctrlCommon:CommandHelper.Target="{x:Static common:DeviceName.Robot}" ctrlCommon:CommandHelper.Parameter1="{Binding SelectedItem, ElementName=cboGotoTarget, Converter={StaticResource TargetKeyValueConverter}}" ctrlCommon:CommandHelper.Parameter2="{Binding SelectedValue ,ElementName=cboGotoSlot}" ctrlCommon:CommandHelper.Parameter3="{Binding SelectedItem, ElementName=cboGotoHand}" ctrlCommon:CommandHelper.Parameter4="0" ctrlCommon:CommandHelper.Parameter5="0" ctrlCommon:CommandHelper.Parameter6="0" ctrlCommon:CommandHelper.Parameter7="0"/>-->
  120. </Grid>
  121. </Grid>
  122. </uc:HeaderPanel>
  123. </Grid>
  124. </uc:ViewModelControl>