209 lines
11 KiB
Plaintext
209 lines
11 KiB
Plaintext
|
|
<UserControl x:Class="Cowain.Bake.Main.Views.EquipmentMonitorView"
|
||
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||
|
|
xmlns:prism="http://prismlibrary.com/"
|
||
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||
|
|
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||
|
|
mc:Ignorable="d"
|
||
|
|
prism:ViewModelLocator.AutoWireViewModel="True"
|
||
|
|
Loaded="EquipmentMonitorView_Loaded"
|
||
|
|
d:DesignHeight="450" d:DesignWidth="800">
|
||
|
|
<UserControl.Resources>
|
||
|
|
<Style x:Key="DefaultToolTipStyle" TargetType="{x:Type ToolTip}">
|
||
|
|
<Setter Property="Foreground" Value="Yellow"/>
|
||
|
|
<Setter Property = "Background" Value="Blue"/>
|
||
|
|
<Setter Property = "FontSize" Value="14"/>
|
||
|
|
<Setter Property="BorderBrush" Value="White"/>
|
||
|
|
</Style>
|
||
|
|
<Style x:Key="MyButton" TargetType="Button">
|
||
|
|
<Style.Triggers>
|
||
|
|
<Trigger Property="IsMouseOver" Value="True">
|
||
|
|
<Setter Property="Background" Value="LightBlue"/>
|
||
|
|
</Trigger>
|
||
|
|
</Style.Triggers>
|
||
|
|
</Style>
|
||
|
|
</UserControl.Resources>
|
||
|
|
<Canvas x:Name="mainCanvas" Margin="0,0,0,0" Height="auto" Width="auto" Loaded="Canvas_Loaded">
|
||
|
|
<Canvas.Background>
|
||
|
|
<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
|
||
|
|
<!-- 起点颜色 -->
|
||
|
|
<GradientStop Color="LightBlue" Offset="0" />
|
||
|
|
<!-- 终点颜色 -->
|
||
|
|
<GradientStop Color="LightBlue" Offset="1" />
|
||
|
|
</LinearGradientBrush>
|
||
|
|
</Canvas.Background>
|
||
|
|
<Grid Canvas.Left="0" Canvas.Top="0" Width="700" Height="30">
|
||
|
|
<!-- 定义一行七列 -->
|
||
|
|
<Grid.RowDefinitions>
|
||
|
|
<RowDefinition Height="*"/>
|
||
|
|
</Grid.RowDefinitions>
|
||
|
|
<Grid.ColumnDefinitions>
|
||
|
|
<ColumnDefinition Width="*"/>
|
||
|
|
<ColumnDefinition Width="*"/>
|
||
|
|
<ColumnDefinition Width="*"/>
|
||
|
|
<ColumnDefinition Width="*"/>
|
||
|
|
<ColumnDefinition Width="*"/>
|
||
|
|
<ColumnDefinition Width="*"/>
|
||
|
|
<ColumnDefinition Width="*"/>
|
||
|
|
<ColumnDefinition Width="*"/>
|
||
|
|
<ColumnDefinition Width="*"/>
|
||
|
|
<ColumnDefinition Width="*"/>
|
||
|
|
</Grid.ColumnDefinitions>
|
||
|
|
|
||
|
|
<!-- 为每一列设置单独的背景色和内容 -->
|
||
|
|
<Border Grid.Column="0" Background="White">
|
||
|
|
<TextBlock Text="空夹具" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Black" FontSize="16"/>
|
||
|
|
</Border>
|
||
|
|
<Border Grid.Column="1" Background="Bisque">
|
||
|
|
<TextBlock Text="上料中" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Black" FontSize="16"/>
|
||
|
|
</Border>
|
||
|
|
<Border Grid.Column="2" Background="Purple">
|
||
|
|
<TextBlock Text="满载" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="16"/>
|
||
|
|
</Border>
|
||
|
|
<Border Grid.Column="3" Background="DarkOrange">
|
||
|
|
<TextBlock Text="烘烤中" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="16"/>
|
||
|
|
</Border>
|
||
|
|
<Border Grid.Column="4" Background="Green">
|
||
|
|
<TextBlock Text="烘烤完成" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="16"/>
|
||
|
|
</Border>
|
||
|
|
<Border Grid.Column="5" Background="gold">
|
||
|
|
<TextBlock Text="待测结果" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="16"/>
|
||
|
|
</Border>
|
||
|
|
<Border Grid.Column="6" Background="PaleGreen">
|
||
|
|
<TextBlock Text="检测OK" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="16"/>
|
||
|
|
</Border>
|
||
|
|
<Border Grid.Column="7" Background="DeepPink">
|
||
|
|
<TextBlock Text="检测NG" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="16"/>
|
||
|
|
</Border>
|
||
|
|
|
||
|
|
<Border Grid.Column="8" Background="LightSteelBlue">
|
||
|
|
<TextBlock Text="下料中" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="16"/>
|
||
|
|
</Border>
|
||
|
|
|
||
|
|
<Border Grid.Column="9" Background="Tan">
|
||
|
|
<TextBlock Text="维修中" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="16"/>
|
||
|
|
</Border>
|
||
|
|
<Border Grid.Column="10" Background="red">
|
||
|
|
<TextBlock Text="异常" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="16"/>
|
||
|
|
</Border>
|
||
|
|
</Grid>
|
||
|
|
<Grid Canvas.Left="0" Canvas.Top="45" Width="500" Height="60">
|
||
|
|
<hc:StepBar x:Name="StepBarControl" StepIndex="{Binding StepIndex}" >
|
||
|
|
<hc:StepBarItem Content="无任务"/>
|
||
|
|
<hc:StepBarItem Content="移至取位">
|
||
|
|
<hc:StepBarItem.ContextMenu>
|
||
|
|
<ContextMenu>
|
||
|
|
<MenuItem Header="发送指令" Command="{Binding ReSendCommand}"
|
||
|
|
CommandParameter="10" />
|
||
|
|
</ContextMenu>
|
||
|
|
</hc:StepBarItem.ContextMenu>
|
||
|
|
</hc:StepBarItem>
|
||
|
|
<hc:StepBarItem Content="取盘">
|
||
|
|
<hc:StepBarItem.ContextMenu>
|
||
|
|
<ContextMenu>
|
||
|
|
<MenuItem Header="发送指令" Command="{Binding ReSendCommand}"
|
||
|
|
CommandParameter="20"/>
|
||
|
|
</ContextMenu>
|
||
|
|
</hc:StepBarItem.ContextMenu>
|
||
|
|
</hc:StepBarItem>
|
||
|
|
|
||
|
|
<hc:StepBarItem Content="移至放位">
|
||
|
|
<hc:StepBarItem.ContextMenu>
|
||
|
|
<ContextMenu>
|
||
|
|
<MenuItem Header="发送指令" Command="{Binding ReSendCommand}"
|
||
|
|
CommandParameter="11" />
|
||
|
|
</ContextMenu>
|
||
|
|
</hc:StepBarItem.ContextMenu>
|
||
|
|
</hc:StepBarItem>
|
||
|
|
|
||
|
|
<hc:StepBarItem Content="放盘">
|
||
|
|
<hc:StepBarItem.ContextMenu>
|
||
|
|
<ContextMenu>
|
||
|
|
<MenuItem Header="发送指令" Command="{Binding ReSendCommand}"
|
||
|
|
CommandParameter="30" />
|
||
|
|
</ContextMenu>
|
||
|
|
</hc:StepBarItem.ContextMenu>
|
||
|
|
</hc:StepBarItem>
|
||
|
|
|
||
|
|
<hc:StepBarItem Content="完成"/>
|
||
|
|
</hc:StepBar>
|
||
|
|
</Grid>
|
||
|
|
<Grid Canvas.Right="0" Canvas.Top="40" Width="700" Height="50">
|
||
|
|
<!-- 定义一行七列 -->
|
||
|
|
<Grid.RowDefinitions>
|
||
|
|
<RowDefinition Height="*"/>
|
||
|
|
<RowDefinition Height="*"/>
|
||
|
|
</Grid.RowDefinitions>
|
||
|
|
<Grid.ColumnDefinitions>
|
||
|
|
<ColumnDefinition Width="1*"/>
|
||
|
|
<ColumnDefinition Width="1.5*"/>
|
||
|
|
<ColumnDefinition Width="1*"/>
|
||
|
|
<ColumnDefinition Width="1.2*"/>
|
||
|
|
<ColumnDefinition Width="1*"/>
|
||
|
|
<ColumnDefinition Width="3*"/>
|
||
|
|
</Grid.ColumnDefinitions>
|
||
|
|
|
||
|
|
<!-- 为每一列设置单独的背景色和内容 -->
|
||
|
|
<Border Grid.Row="0" Background="Transparent">
|
||
|
|
<TextBlock Text="取盘位置:" HorizontalAlignment="Right" VerticalAlignment="Center" Foreground="White" FontSize="14"/>
|
||
|
|
</Border>
|
||
|
|
<Border Grid.Row="0" Grid.Column="1" Background="Transparent">
|
||
|
|
<TextBlock Text="{Binding CavitySourceName}" HorizontalAlignment="Left" FontWeight="Bold" VerticalAlignment="Center" Foreground="White" FontSize="16"/>
|
||
|
|
</Border>
|
||
|
|
|
||
|
|
<Border Grid.Row="0" Grid.Column="2" Background="Transparent">
|
||
|
|
<TextBlock Text="任务状态:" HorizontalAlignment="Right" VerticalAlignment="Center" Foreground="White" FontSize="14"/>
|
||
|
|
</Border>
|
||
|
|
<Border Grid.Row="0" Grid.Column="3" Background="Transparent">
|
||
|
|
<TextBlock Text="{Binding TaskStatusName}" HorizontalAlignment="Left" FontWeight="Bold" VerticalAlignment="Center" Foreground="White" FontSize="16"/>
|
||
|
|
</Border>
|
||
|
|
|
||
|
|
<Border Grid.Row="0" Grid.Column="4" Background="Transparent">
|
||
|
|
<TextBlock Text="任务类型:" HorizontalAlignment="Right" VerticalAlignment="Center" Foreground="White" FontSize="14"/>
|
||
|
|
</Border>
|
||
|
|
<Border Grid.Row="0" Grid.Column="5" Background="Transparent">
|
||
|
|
<TextBlock Text="{Binding TaskTypeName}" HorizontalAlignment="Left" FontWeight="Bold" VerticalAlignment="Center" Foreground="White" FontSize="16"/>
|
||
|
|
</Border>
|
||
|
|
|
||
|
|
<Border Grid.Row="1" Grid.Column="0" Background="Transparent">
|
||
|
|
<TextBlock Text="放盘位置:" HorizontalAlignment="Right" VerticalAlignment="Center" Foreground="White" FontSize="14"/>
|
||
|
|
</Border>
|
||
|
|
<Border Grid.Row="1" Grid.Column="1" Background="Transparent">
|
||
|
|
<TextBlock Text="{Binding CavityTargetName}" HorizontalAlignment="Left" FontWeight="Bold" VerticalAlignment="Center" Foreground="White" FontSize="16"/>
|
||
|
|
</Border>
|
||
|
|
|
||
|
|
<Border Grid.Row="1" Grid.Column="2" Background="Transparent">
|
||
|
|
<TextBlock Text="夹具条码:" HorizontalAlignment="Right" VerticalAlignment="Center" Foreground="White" FontSize="14"/>
|
||
|
|
</Border>
|
||
|
|
<Border Grid.Row="1" Grid.Column="3" Background="Transparent">
|
||
|
|
<TextBlock Text="{Binding PalletCode}" HorizontalAlignment="Left" FontWeight="Bold" VerticalAlignment="Center" Foreground="White" FontSize="16"/>
|
||
|
|
</Border>
|
||
|
|
|
||
|
|
<Border Grid.Row="1" Grid.Column="4" Background="Transparent">
|
||
|
|
<TextBlock Text="开始时间:" HorizontalAlignment="Right" VerticalAlignment="Center" Foreground="White" FontSize="14"/>
|
||
|
|
</Border>
|
||
|
|
<Border Grid.Row="1" Grid.Column="5" Background="Transparent">
|
||
|
|
<TextBlock Text="{Binding StartTime,StringFormat=yyyy-MM-dd HH:mm:ss}" HorizontalAlignment="Left" FontWeight="Bold" VerticalAlignment="Center" Foreground="White" FontSize="16"/>
|
||
|
|
</Border>
|
||
|
|
</Grid>
|
||
|
|
|
||
|
|
<Button Content="" x:Name="AGV" HorizontalAlignment="Left"
|
||
|
|
VerticalAlignment="Top" Width="80" Height="73" Canvas.Left="14" Canvas.Top="{Binding HandMachineYLocation}" Panel.ZIndex="101">
|
||
|
|
<Button.RenderTransform>
|
||
|
|
<TranslateTransform x:Name="machineAnimation"/>
|
||
|
|
</Button.RenderTransform>
|
||
|
|
<Button.Template>
|
||
|
|
<ControlTemplate>
|
||
|
|
<Grid>
|
||
|
|
<Label Name="handMachineLabel" Panel.ZIndex="100" HorizontalContentAlignment="Center" Foreground="Black" FontSize="13px" Content="{Binding RgvPalletCode}" Width="80" Height="30" Style="{StaticResource BaseStyle}" Margin="0,0,0,0">
|
||
|
|
</Label>
|
||
|
|
<Image Source="{Binding ImageSource}"></Image>
|
||
|
|
</Grid>
|
||
|
|
</ControlTemplate>
|
||
|
|
</Button.Template>
|
||
|
|
</Button>
|
||
|
|
<Canvas x:Name="pathCanvas" Panel.ZIndex="99" Margin="0,0,0,0" Height="auto" Width="auto"></Canvas>
|
||
|
|
</Canvas>
|
||
|
|
</UserControl>
|