You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
261 lines
20 KiB
261 lines
20 KiB
<UserControl x:Class="Gumming.RobotManualView"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
mc:Ignorable="d"
|
|
xmlns:local="clr-namespace:Gumming"
|
|
xmlns:tool="clr-namespace:GummingCommon;assembly=GummingCommon"
|
|
xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
|
|
d:DesignHeight="700" d:DesignWidth="1000"
|
|
Background="Transparent"
|
|
x:Name="rootControl">
|
|
<UserControl.Resources>
|
|
<tool:RadioButtonConverter x:Key="RadioConverter"/>
|
|
<tool:BooleanToOpacityConverter x:Key="OpacityConverter"/>
|
|
<tool:EditorTextConverter x:Key="TextBrushConverter"/>
|
|
<tool:EditorBorderConverter x:Key="BorderBrushConverter"/>
|
|
<tool:PathTypeToThemeConverter x:Key="PathTypeConverter"/>
|
|
<tool:StepStyleConverter x:Key="StepStyleConverter"/>
|
|
<tool:TagStyleConverter x:Key="TagStyleConverter"/>
|
|
</UserControl.Resources>
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*"></ColumnDefinition>
|
|
<ColumnDefinition Width="10"></ColumnDefinition>
|
|
<ColumnDefinition Width="400"></ColumnDefinition>
|
|
</Grid.ColumnDefinitions>
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition></RowDefinition>
|
|
<RowDefinition Height="400"></RowDefinition>
|
|
<RowDefinition></RowDefinition>
|
|
</Grid.RowDefinitions>
|
|
<Image Grid.Row="1" Source="/Gumming;component/Resource/Robot.png" Stretch="Fill" Width="400" Height="400">
|
|
</Image>
|
|
</Grid>
|
|
<Grid Grid.Column="2">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="185"></RowDefinition>
|
|
<RowDefinition Height="5"></RowDefinition>
|
|
<RowDefinition Height="40"></RowDefinition>
|
|
<RowDefinition Height="3"></RowDefinition>
|
|
<RowDefinition Height="40"></RowDefinition>
|
|
<RowDefinition Height="3"></RowDefinition>
|
|
<RowDefinition Height="40"></RowDefinition>
|
|
<RowDefinition Height="3"></RowDefinition>
|
|
<RowDefinition Height="40"></RowDefinition>
|
|
<RowDefinition Height="3"></RowDefinition>
|
|
<RowDefinition Height="80"></RowDefinition>
|
|
<RowDefinition Height="3"></RowDefinition>
|
|
<RowDefinition Height="40"></RowDefinition>
|
|
<RowDefinition Height="3"></RowDefinition>
|
|
<RowDefinition Height="*"></RowDefinition>
|
|
</Grid.RowDefinitions>
|
|
<Border Grid.Row="0" BorderThickness="1" BorderBrush="{DynamicResource BlackBrushNormal}">
|
|
<Grid Margin="5">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="*"></RowDefinition>
|
|
<RowDefinition Height="5"></RowDefinition>
|
|
<RowDefinition Height="*"></RowDefinition>
|
|
<RowDefinition Height="5"></RowDefinition>
|
|
<RowDefinition Height="*"></RowDefinition>
|
|
<RowDefinition Height="5"></RowDefinition>
|
|
<RowDefinition Height="*"></RowDefinition>
|
|
<RowDefinition Height="5"></RowDefinition>
|
|
<RowDefinition Height="*"></RowDefinition>
|
|
</Grid.RowDefinitions>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*"></ColumnDefinition>
|
|
<ColumnDefinition Width="10"></ColumnDefinition>
|
|
<ColumnDefinition Width="*"></ColumnDefinition>
|
|
<ColumnDefinition Width="10"></ColumnDefinition>
|
|
<ColumnDefinition Width="*"></ColumnDefinition>
|
|
<ColumnDefinition Width="10"></ColumnDefinition>
|
|
|
|
<ColumnDefinition Width="*"></ColumnDefinition>
|
|
</Grid.ColumnDefinitions>
|
|
<TextBlock Text="机器人控制" HorizontalAlignment="Left" VerticalAlignment="Stretch" Margin="2" FontSize="14" Foreground="{DynamicResource FontBrush1}" ></TextBlock>
|
|
<TextBlock Text="槽位" Grid.Column="6" HorizontalAlignment="Left" VerticalAlignment="Stretch" Margin="2" FontSize="14" Foreground="{DynamicResource FontBrush1}" ></TextBlock>
|
|
<TextBlock Grid.Row="2" Grid.Column="0" Text="原工位" HorizontalAlignment="Left" VerticalAlignment="Stretch" Margin="2" FontSize="14" Foreground="{DynamicResource FontBrush1}" ></TextBlock>
|
|
<ComboBox Grid.Row="2" Grid.Column="2" Grid.ColumnSpan="3" Margin="0,3,0,3" BorderThickness="1" ItemsSource="{Binding Path=StationSources}" SelectedItem="{Binding SelectedStationSource, Mode=TwoWay}">
|
|
<ComboBox.ItemTemplate>
|
|
<DataTemplate>
|
|
<TextBlock Text="{Binding StationCode, Mode=TwoWay}"/>
|
|
</DataTemplate>
|
|
</ComboBox.ItemTemplate>
|
|
</ComboBox>
|
|
<ComboBox Grid.Row="2" Grid.Column="6" Margin="0,3,0,3" BorderThickness="1" IsEnabled="{Binding SourceIndexEnabled}" ItemsSource="{Binding Path=SourceIndexs}" SelectedItem="{Binding SelectedSourceIndex, Mode=TwoWay}">
|
|
<ComboBox.ItemTemplate>
|
|
<DataTemplate>
|
|
<TextBlock Text="{Binding ComboName, Mode=TwoWay}"/>
|
|
</DataTemplate>
|
|
</ComboBox.ItemTemplate>
|
|
</ComboBox>
|
|
<TextBlock Grid.Row="4" Grid.Column="0" Text="目标工位" HorizontalAlignment="Left" VerticalAlignment="Stretch" Margin="2" FontSize="14" Foreground="{DynamicResource FontBrush1}" ></TextBlock>
|
|
<ComboBox Grid.Row="4" Grid.Column="2" Grid.ColumnSpan="3" Margin="0,3,0,3" BorderThickness="1" ItemsSource="{Binding Path=StationTargets}" SelectedItem="{Binding SelectedStationTarget, Mode=TwoWay}">
|
|
<ComboBox.ItemTemplate>
|
|
<DataTemplate>
|
|
<TextBlock Text="{Binding StationCode, Mode=TwoWay}"/>
|
|
</DataTemplate>
|
|
</ComboBox.ItemTemplate>
|
|
</ComboBox>
|
|
<ComboBox Grid.Row="4" Grid.Column="6" Margin="0,3,0,3" BorderThickness="1" IsEnabled="{Binding TargetIndexEnabled}" ItemsSource="{Binding Path=TargetIndexs}" SelectedItem="{Binding SelectedTargetIndex, Mode=TwoWay}">
|
|
<ComboBox.ItemTemplate>
|
|
<DataTemplate>
|
|
<TextBlock Text="{Binding ComboName, Mode=TwoWay}"/>
|
|
</DataTemplate>
|
|
</ComboBox.ItemTemplate>
|
|
</ComboBox>
|
|
<TextBlock Grid.Row="6" Grid.Column="0" Text="手臂" HorizontalAlignment="Left" VerticalAlignment="Stretch" Margin="2" FontSize="14" Foreground="{DynamicResource FontBrush1}" ></TextBlock>
|
|
<ComboBox Grid.Row="6" Grid.Column="2" Grid.ColumnSpan="3" Margin="0,3,0,3" BorderThickness="1" ItemsSource="{Binding Path=RobotStations}" SelectedItem="{Binding SelectedRobotStation, Mode=TwoWay}">
|
|
<ComboBox.ItemTemplate>
|
|
<DataTemplate>
|
|
<TextBlock Text="{Binding ComboName, Mode=TwoWay}"/>
|
|
</DataTemplate>
|
|
</ComboBox.ItemTemplate>
|
|
</ComboBox>
|
|
<Button Grid.Row="8" Grid.Column="2" Margin="2" FontSize="15" Style="{Binding Path=Status[0],Converter={StaticResource TagStyleConverter}}" Tag="{Binding Status[0]}" Command="{Binding GetDiskCommand}" Content="取片"></Button>
|
|
<Button Grid.Row="8" Grid.Column="4" Margin="2" FontSize="15" Style="{Binding Path=Status[1],Converter={StaticResource TagStyleConverter}}" Tag="{Binding Status[1]}" Command="{Binding PutDiskCommand}" Content="放片"></Button>
|
|
<Button Grid.Row="8" Grid.Column="6" Margin="2" FontSize="15" Style="{Binding Path=Status[2],Converter={StaticResource TagStyleConverter}}" Tag="{Binding Status[2]}" Command="{Binding TerminalCommand}" Content="终止"></Button>
|
|
</Grid>
|
|
</Border>
|
|
<Border Grid.Row="2" BorderThickness="1" BorderBrush="{DynamicResource BlackBrushNormal}">
|
|
<Grid Margin="5">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="*"></RowDefinition>
|
|
</Grid.RowDefinitions>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*"></ColumnDefinition>
|
|
<ColumnDefinition Width="10"></ColumnDefinition>
|
|
<ColumnDefinition Width="*"></ColumnDefinition>
|
|
<ColumnDefinition Width="10"></ColumnDefinition>
|
|
<ColumnDefinition Width="*"></ColumnDefinition>
|
|
<ColumnDefinition Width="10"></ColumnDefinition>
|
|
<ColumnDefinition Width="*"></ColumnDefinition>
|
|
</Grid.ColumnDefinitions>
|
|
<TextBlock Grid.Row="4" Grid.Column="0" Text="动作指令" HorizontalAlignment="Left" VerticalAlignment="Stretch" Margin="2" FontSize="14" Foreground="{DynamicResource FontBrush1}" ></TextBlock>
|
|
<Button Grid.Row="6" Grid.Column="2" Margin="2" FontSize="15" Style="{Binding Path=SVONStatus,Converter={StaticResource TagStyleConverter}}" Tag="{Binding SVONStatus}" Command="{Binding SVONCommand}" Content="SVON"></Button>
|
|
<Button Grid.Row="6" Grid.Column="4" Margin="2" FontSize="15" Style="{Binding Path=Status[4],Converter={StaticResource TagStyleConverter}}" Tag="{Binding Status[4]}" Command="{Binding HomeCommand}" Content="HOME"></Button>
|
|
</Grid>
|
|
</Border>
|
|
<Border Grid.Row="4" BorderThickness="1" BorderBrush="{DynamicResource BlackBrushNormal}">
|
|
<Grid Margin="5">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="*"></RowDefinition>
|
|
</Grid.RowDefinitions>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*"></ColumnDefinition>
|
|
<ColumnDefinition Width="10"></ColumnDefinition>
|
|
<ColumnDefinition Width="*"></ColumnDefinition>
|
|
<ColumnDefinition Width="10"></ColumnDefinition>
|
|
<ColumnDefinition Width="*"></ColumnDefinition>
|
|
<ColumnDefinition Width="10"></ColumnDefinition>
|
|
<ColumnDefinition Width="*"></ColumnDefinition>
|
|
</Grid.ColumnDefinitions>
|
|
<TextBlock Grid.Row="0" Grid.Column="0" Text="手动真空" HorizontalAlignment="Left" VerticalAlignment="Stretch" Margin="2" FontSize="14" Foreground="{DynamicResource FontBrush1}" ></TextBlock>
|
|
<Button Grid.Row="2" Grid.Column="2" Margin="2" FontSize="15" Style="{Binding Path=ASpaceStatus,Converter={StaticResource TagStyleConverter}}" Tag="{Binding ASpaceStatus}" Command="{Binding AEmptyCommand}" Content="上指真空"></Button>
|
|
<Button Grid.Row="2" Grid.Column="4" Margin="2" FontSize="15" Style="{Binding Path=BSpaceStatus,Converter={StaticResource TagStyleConverter}}" Tag="{Binding BSpaceStatus}" Command="{Binding BEmptyCommand}" Content="下指真空"></Button>
|
|
</Grid>
|
|
</Border>
|
|
<Border Grid.Row="6" BorderThickness="1" BorderBrush="{DynamicResource BlackBrushNormal}">
|
|
<Grid Margin="5">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="*"></RowDefinition>
|
|
</Grid.RowDefinitions>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*"></ColumnDefinition>
|
|
<ColumnDefinition Width="10"></ColumnDefinition>
|
|
<ColumnDefinition Width="*"></ColumnDefinition>
|
|
<ColumnDefinition Width="10"></ColumnDefinition>
|
|
<ColumnDefinition Width="*"></ColumnDefinition>
|
|
<ColumnDefinition Width="10"></ColumnDefinition>
|
|
<ColumnDefinition Width="*"></ColumnDefinition>
|
|
</Grid.ColumnDefinitions>
|
|
<TextBlock Grid.Row="4" Grid.Column="0" Text="遮挡窗开闭" HorizontalAlignment="Left" VerticalAlignment="Stretch" Margin="2" FontSize="14" Foreground="{DynamicResource FontBrush1}" ></TextBlock>
|
|
<ComboBox Grid.Row="2" Grid.Column="2" Grid.ColumnSpan="3" Margin="0,3,0,3" BorderThickness="1" ItemsSource="{Binding Path=StationWindows}" SelectedItem="{Binding SelectedStationWindow, Mode=TwoWay}">
|
|
<ComboBox.ItemTemplate>
|
|
<DataTemplate>
|
|
<TextBlock Text="{Binding StationCode, Mode=TwoWay}"/>
|
|
</DataTemplate>
|
|
</ComboBox.ItemTemplate>
|
|
</ComboBox>
|
|
<Button Grid.Row="2" Grid.Column="6" Margin="2" FontSize="15" Style="{Binding Path=WindowStatus,Converter={StaticResource TagStyleConverter}}" Tag="{Binding WindowStatus}" Command="{Binding WindowCommand}" Content="遮挡窗"></Button>
|
|
</Grid>
|
|
</Border>
|
|
<Border Grid.Row="8" BorderThickness="1" BorderBrush="{DynamicResource BlackBrushNormal}">
|
|
<Grid Margin="5">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="*"></RowDefinition>
|
|
</Grid.RowDefinitions>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*"></ColumnDefinition>
|
|
<ColumnDefinition Width="10"></ColumnDefinition>
|
|
<ColumnDefinition Width="*"></ColumnDefinition>
|
|
<ColumnDefinition Width="10"></ColumnDefinition>
|
|
<ColumnDefinition Width="*"></ColumnDefinition>
|
|
<ColumnDefinition Width="10"></ColumnDefinition>
|
|
<ColumnDefinition Width="*"></ColumnDefinition>
|
|
</Grid.ColumnDefinitions>
|
|
<Button Grid.Row="0" Grid.Column="2" Margin="2" FontSize="15" Style="{Binding Path=Status[8],Converter={StaticResource TagStyleConverter}}" Tag="{Binding Status[8]}" Command="{Binding ClearAllCommand}" Content="全部清片"></Button>
|
|
</Grid>
|
|
</Border>
|
|
<Border Grid.Row="10" BorderThickness="1" BorderBrush="{DynamicResource BlackBrushNormal}">
|
|
<Grid Margin="5">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="*"></RowDefinition>
|
|
<RowDefinition Height="10"></RowDefinition>
|
|
<RowDefinition Height="*"></RowDefinition>
|
|
</Grid.RowDefinitions>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*"></ColumnDefinition>
|
|
<ColumnDefinition Width="10"></ColumnDefinition>
|
|
<ColumnDefinition Width="*"></ColumnDefinition>
|
|
<ColumnDefinition Width="10"></ColumnDefinition>
|
|
<ColumnDefinition Width="*"></ColumnDefinition>
|
|
<ColumnDefinition Width="10"></ColumnDefinition>
|
|
<ColumnDefinition Width="*"></ColumnDefinition>
|
|
</Grid.ColumnDefinitions>
|
|
<TextBlock Grid.Row="0" Grid.Column="0" Text="寻片扫描" HorizontalAlignment="Left" VerticalAlignment="Stretch" Margin="2" FontSize="14" Foreground="{DynamicResource FontBrush1}" ></TextBlock>
|
|
<ComboBox Grid.Row="0" Grid.Column="2" Grid.ColumnSpan="3" Margin="0,3,0,3" BorderThickness="1" ItemsSource="{Binding Path=MapTypes}" SelectedItem="{Binding SelectedMapType, Mode=TwoWay}">
|
|
<ComboBox.ItemTemplate>
|
|
<DataTemplate>
|
|
<TextBlock Text="{Binding TypeName, Mode=TwoWay}"/>
|
|
</DataTemplate>
|
|
</ComboBox.ItemTemplate>
|
|
<i:Interaction.Triggers>
|
|
<i:EventTrigger EventName="SelectionChanged">
|
|
<i:InvokeCommandAction Command="{Binding DataContext.SelectedMapTypeChangedCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=UserControl}}"/>
|
|
</i:EventTrigger>
|
|
</i:Interaction.Triggers>
|
|
</ComboBox>
|
|
<Button Grid.Row="4" Grid.Column="2" Margin="2" FontSize="15" Style="{Binding Path=Status[10],Converter={StaticResource TagStyleConverter}}" Tag="{Binding Status[10]}" Command="{Binding ScanACommand}" Content="CS1寻片"></Button>
|
|
<Button Grid.Row="4" Grid.Column="4" Margin="2" FontSize="15" Style="{Binding Path=Status[11],Converter={StaticResource TagStyleConverter}}" Tag="{Binding Status[11]}" Command="{Binding ScanBCommand}" Content="CS2寻片"></Button>
|
|
</Grid>
|
|
</Border>
|
|
<Border Grid.Row="12" BorderThickness="1" BorderBrush="{DynamicResource BlackBrushNormal}">
|
|
<Grid Margin="5">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="*"></RowDefinition>
|
|
</Grid.RowDefinitions>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*"></ColumnDefinition>
|
|
<ColumnDefinition Width="10"></ColumnDefinition>
|
|
<ColumnDefinition Width="*"></ColumnDefinition>
|
|
<ColumnDefinition Width="10"></ColumnDefinition>
|
|
<ColumnDefinition Width="*"></ColumnDefinition>
|
|
<ColumnDefinition Width="10"></ColumnDefinition>
|
|
<ColumnDefinition Width="*"></ColumnDefinition>
|
|
</Grid.ColumnDefinitions>
|
|
<TextBlock Grid.Row="0" Grid.Column="0" Text="机器人命令" HorizontalAlignment="Left" VerticalAlignment="Stretch" Margin="2" FontSize="14" Foreground="{DynamicResource FontBrush1}" ></TextBlock>
|
|
<TextBox Grid.Row="0" Grid.Column="2" Grid.ColumnSpan="3" Margin="0,3,0,3" Text="{Binding CommandMessage}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" FontSize="14"></TextBox>
|
|
<Button Grid.Row="0" Grid.Column="6" Margin="2" FontSize="15" Style="{Binding Path=Status[12],Converter={StaticResource TagStyleConverter}}" Tag="{Binding Status[12]}" Command="{Binding CommandSender}" Content="发送命令"></Button>
|
|
</Grid>
|
|
</Border>
|
|
<ScrollViewer Grid.Row="14" >
|
|
<TextBlock Text="{Binding DetailMessage}" HorizontalAlignment="Left" VerticalAlignment="Top" TextWrapping="Wrap" ScrollViewer.VerticalScrollBarVisibility="Auto" ScrollViewer.CanContentScroll="True" Margin="2" FontSize="14" Foreground="{DynamicResource FontBrush1}" ></TextBlock>
|
|
</ScrollViewer>
|
|
</Grid>
|
|
</Grid>
|
|
</UserControl>
|