RobotServiceControl.xaml 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. <uc:ViewModelControl x:Class="Aitex.Sorter.UI.Controls.RobotServiceControl"
  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="530" HorizontalAlignment="left" VerticalAlignment="Top" Header="Robot">
  29. <Grid Height="620" ctrlCommon:GridHelper.Column0="LightBlue" ctrlCommon:GridHelper.Column1="Transparent" ctrlCommon:GridHelper.Column2="LightBlue" 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="35" />
  38. <RowDefinition Height="55" />
  39. <RowDefinition Height="55" />
  40. <RowDefinition Height="55" />
  41. <RowDefinition Height="55" />
  42. <RowDefinition Height="55" />
  43. <RowDefinition Height="55" />
  44. <RowDefinition Height="55" />
  45. </Grid.RowDefinitions>
  46. <Label Grid.Row="0" Grid.Column="0" Content="Status" />
  47. <Label Content="{Binding Status}" Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="3" />
  48. <Grid Grid.Row="1" VerticalAlignment="Center" Grid.ColumnSpan="4">
  49. <StackPanel Orientation="Horizontal" Grid.Row="0" Margin="140,0,0,0">
  50. <Button Content="Home" Command="{Binding Command}" ctrlCommon:CommandHelper.CommandName="Home" ctrlCommon:CommandHelper.Target="{x:Static common:DeviceName.Robot}" />
  51. <Button Content="Reset" Command="{Binding Command}" ctrlCommon:CommandHelper.CommandName="Reset" ctrlCommon:CommandHelper.Target="{x:Static common:DeviceName.Robot}" />
  52. <Button Content="Stop" Command="{Binding Command}" ctrlCommon:CommandHelper.CommandName="Stop" ctrlCommon:CommandHelper.Target="{x:Static common:DeviceName.Robot}"/>
  53. </StackPanel>
  54. </Grid>
  55. <Grid Grid.Row="2" HorizontalAlignment="Center" Grid.ColumnSpan="4">
  56. <Grid.ColumnDefinitions>
  57. <ColumnDefinition Width="140" />
  58. <ColumnDefinition Width="*" />
  59. </Grid.ColumnDefinitions>
  60. <ComboBox x:Name="cboGripHand" Margin="8" ItemsSource="{Binding Hands}"/>
  61. <StackPanel Grid.Column="1" Orientation="Horizontal">
  62. <Button Content="Grip" Command="{Binding Command}" ctrlCommon:CommandHelper.CommandName="Grip" ctrlCommon:CommandHelper.Target="{x:Static common:DeviceName.Robot}" ctrlCommon:CommandHelper.Parameter1="{Binding SelectedIndex, ElementName=cboGripHand}"/>
  63. <Button Content="Ungrip" Command="{Binding Command}" ctrlCommon:CommandHelper.CommandName="Release" ctrlCommon:CommandHelper.Target="{x:Static common:DeviceName.Robot}" ctrlCommon:CommandHelper.Parameter1="{Binding SelectedIndex, ElementName=cboGripHand}"/>
  64. </StackPanel>
  65. </Grid>
  66. <Label Content="Set Speed" Grid.Row="3" Grid.Column="0"/>
  67. <StackPanel Orientation="Horizontal" Grid.Row="3" Grid.Column="1" Grid.ColumnSpan="3" >
  68. <Button Command="{Binding SetSpeedCommand}" ctrlCommon:CommandHelper.CommandName="{x:Static common:OperationName.SetSpeed}" ctrlCommon:CommandHelper.Parameter1="3"
  69. Margin="8,0,0,0" Content="Low" VerticalAlignment="Center" />
  70. <Button Command="{Binding SetSpeedCommand}" ctrlCommon:CommandHelper.CommandName="{x:Static common:OperationName.SetSpeed}" ctrlCommon:CommandHelper.Parameter1="2"
  71. Margin="8,0,0,0" Content="Medium" VerticalAlignment="Center" />
  72. <Button Command="{Binding SetSpeedCommand}" ctrlCommon:CommandHelper.CommandName="{x:Static common:OperationName.SetSpeed}" ctrlCommon:CommandHelper.Parameter1="1"
  73. Margin="8,0,0,0" Content="High" VerticalAlignment="Center"
  74. Visibility="{Binding ElementName=self, Path=EnableHighSpeed, Converter={StaticResource bool2VisibilityConvert}}"/>
  75. </StackPanel>
  76. <Grid Grid.Row="4" Grid.RowSpan="3" Grid.ColumnSpan="4">
  77. <Grid.ColumnDefinitions>
  78. <ColumnDefinition Width="*" />
  79. <ColumnDefinition Width="*" />
  80. <ColumnDefinition Width="*" />
  81. <ColumnDefinition Width="*" />
  82. </Grid.ColumnDefinitions>
  83. <Grid.RowDefinitions>
  84. <RowDefinition Height="*" />
  85. <RowDefinition Height="*" />
  86. <RowDefinition Height="*" />
  87. </Grid.RowDefinitions>
  88. <ComboBox x:Name="cboPickTarget" Grid.Row="0" Grid.Column="0" Margin="8" ItemsSource="{Binding Target}" DisplayMemberPath="Key" SelectedValuePath="Value"/>
  89. <ComboBox x:Name="cboPickSlot" DisplayMemberPath="Key" SelectedValuePath="Value" Grid.Row="0" Grid.Column="1" Margin="8" ItemsSource="{Binding SelectedValue, ElementName=cboPickTarget,Converter={StaticResource TargetSlotConverter}}" IsEnabled="{Binding SelectedItem, ElementName=cboPickTarget, Converter={StaticResource valueNotMatchConverter}}"/>
  90. <ComboBox x:Name="cboPickHand" Grid.Row="0" Grid.Column="2" Margin="8" ItemsSource="{Binding Hands}"/>
  91. <Button Grid.Row="0" Grid.Column="3" Content="Pick" 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}"/>
  92. <ComboBox x:Name="cboPlaceTarget" Grid.Row="1" Grid.Column="0" Margin="8" ItemsSource="{Binding Target}" DisplayMemberPath="Key" SelectedValuePath="Value"/>
  93. <ComboBox x:Name="cboPlaceSlot" DisplayMemberPath="Key" SelectedValuePath="Value" Grid.Row="1" Grid.Column="1" Margin="8" ItemsSource="{Binding SelectedValue, ElementName=cboPlaceTarget,Converter={StaticResource TargetSlotConverter}}" IsEnabled="{Binding SelectedItem, ElementName=cboPlaceTarget, Converter={StaticResource valueNotMatchConverter}}"/>
  94. <ComboBox x:Name="cboPlaceHand" Grid.Row="1" Grid.Column="2" Margin="8" ItemsSource="{Binding Hands}"/>
  95. <Button Grid.Row="1" Grid.Column="3" Content="Place" 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=cboPlaceHand}" ctrlCommon:CommandHelper.Parameter4="{x:Static equipment:ModuleName.Robot}" ctrlCommon:CommandHelper.Parameter5="{Binding SelectedIndex, ElementName=cboPlaceHand}" ctrlCommon:CommandHelper.Parameter6="{Binding SelectedItem, ElementName=cboPlaceTarget, Converter={StaticResource TargetKeyValueConverter}}" ctrlCommon:CommandHelper.Parameter7="{Binding SelectedValue ,ElementName=cboPlaceSlot}"/>
  96. <!--ComboBox x:Name="cboGotoTarget" Grid.Row="2" Grid.Column="0" Margin="4" ItemsSource="{Binding Target}" DisplayMemberPath="Key" SelectedValuePath="Value"/>
  97. <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}}"/>
  98. <ComboBox x:Name="cboGotoHand" Grid.Row="2" Grid.Column="2" Margin="4" ItemsSource="{Binding Hands}"/>
  99. <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"/-->
  100. </Grid>
  101. </Grid>
  102. </uc:HeaderPanel>
  103. </Grid>
  104. </uc:ViewModelControl>