217 lines
12 KiB
XML
217 lines
12 KiB
XML
<Page x:Class="WPFWCSDemo.Views.Devices.RGVsView"
|
|
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"
|
|
xmlns:local="clr-namespace:WPFWCSDemo.Views.Devices"
|
|
mc:Ignorable="d"
|
|
d:DesignHeight="850" d:DesignWidth="1600"
|
|
Title="RGVsView">
|
|
|
|
<Page.Resources>
|
|
<!--RGV参数【名称】格式-->
|
|
<Style x:Key="txtRGVParaName" TargetType="TextBlock">
|
|
<Setter Property="FontSize" Value="18"/>
|
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
|
<Setter Property="Foreground" Value="Gray"/>
|
|
<Setter Property="Margin" Value="0,0,0,7"/>
|
|
<Setter Property="HorizontalAlignment" Value="Center"/>
|
|
<Setter Property="FontWeight" Value="Bold"/>
|
|
</Style>
|
|
<!--RGV参数【值】格式-->
|
|
<Style x:Key="txtRGVParaValue" TargetType="TextBlock">
|
|
<Setter Property="FontSize" Value="18"/>
|
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
|
<Setter Property="Foreground" Value="Black"/>
|
|
<Setter Property="HorizontalAlignment" Value="Center"/>
|
|
<Setter Property="FontWeight" Value="Bold"/>
|
|
</Style>
|
|
<!--RGV参数【值】颜色指示-->
|
|
<Style x:Key="textStateColor" TargetType="TextBlock" BasedOn="{StaticResource txtRGVParaValue}">
|
|
<Style.Triggers>
|
|
<!--/////////////////////////////////////////////////////////////////////////////////-->
|
|
<!--联机自动-->
|
|
<DataTrigger Binding="{Binding ElementName=RGVMode, Path=Text}" Value="联机自动">
|
|
<Setter Property="Foreground">
|
|
<Setter.Value>
|
|
<SolidColorBrush Color="LimeGreen" Opacity=".5"/>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</DataTrigger>
|
|
<!--手动-->
|
|
<DataTrigger Binding="{Binding ElementName=RGVMode, Path=Text}" Value="手动">
|
|
<Setter Property="Foreground">
|
|
<Setter.Value>
|
|
<SolidColorBrush Color="Gold" Opacity=".5"/>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</DataTrigger>
|
|
<!--半自动-->
|
|
<DataTrigger Binding="{Binding ElementName=RGVMode, Path=Text}" Value="半自动">
|
|
<Setter Property="Foreground">
|
|
<Setter.Value>
|
|
<SolidColorBrush Color="DarkOrange" Opacity=".5"/>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</DataTrigger>
|
|
<!--单机自动-->
|
|
<DataTrigger Binding="{Binding ElementName=RGVMode, Path=Text}" Value="单机自动">
|
|
<Setter Property="Foreground">
|
|
<Setter.Value>
|
|
<SolidColorBrush Color="DarkOrange" Opacity=".5"/>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</DataTrigger>
|
|
<!--/////////////////////////////////////////////////////////////////////////////////-->
|
|
<!--设备状态-->
|
|
<DataTrigger Binding="{Binding ElementName=RGVDeviceState, Path=Text}" Value="待机">
|
|
<Setter Property="Foreground">
|
|
<Setter.Value>
|
|
<SolidColorBrush Color="DimGray" Opacity=".5"/>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</DataTrigger>
|
|
<DataTrigger Binding="{Binding ElementName=RGVDeviceState, Path=Text}" Value="运行">
|
|
<Setter Property="Foreground">
|
|
<Setter.Value>
|
|
<SolidColorBrush Color="LimeGreen" Opacity=".5"/>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</DataTrigger>
|
|
<DataTrigger Binding="{Binding ElementName=RGVDeviceState, Path=Text}" Value="报警">
|
|
<Setter Property="Foreground">
|
|
<Setter.Value>
|
|
<SolidColorBrush Color="Red" Opacity=".5"/>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</DataTrigger>
|
|
<!--/////////////////////////////////////////////////////////////////////////////////-->
|
|
<!--允许下发-->
|
|
<DataTrigger Binding="{Binding ElementName=RGVPermission, Path=Text}" Value="允许下发">
|
|
<Setter Property="Foreground">
|
|
<Setter.Value>
|
|
<SolidColorBrush Color="Black" Opacity=".5"/>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</DataTrigger>
|
|
<DataTrigger Binding="{Binding ElementName=RGVPermission, Path=Text}" Value="禁止下发">
|
|
<Setter Property="Foreground">
|
|
<Setter.Value>
|
|
<SolidColorBrush Color="Red" Opacity=".5"/>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
|
|
<!--参数背景-->
|
|
<Style x:Key="myPanel" TargetType="StackPanel">
|
|
<Setter Property="Margin" Value="0,0,50,0"/>
|
|
<Setter Property="Orientation" Value="Vertical"/>
|
|
</Style>
|
|
|
|
<!--设备看板背景-->
|
|
<Style x:Key="deviceBackGround" TargetType="Border">
|
|
<Setter Property="Background" Value="GhostWhite"/>
|
|
<Setter Property="CornerRadius" Value="10"/>
|
|
<Setter Property="Margin" Value="20,10"/>
|
|
<Setter Property="Padding" Value="10"/>
|
|
<Setter Property="HorizontalAlignment" Value="Stretch"/>
|
|
<Setter Property="Width" Value="auto"/>
|
|
<Setter Property="Effect">
|
|
<Setter.Value>
|
|
<DropShadowEffect ShadowDepth="5" BlurRadius="15" Opacity=".8"/>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
</Page.Resources>
|
|
|
|
<!--显示页面-->
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="auto"/>
|
|
<RowDefinition/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<!--RGV-->
|
|
<TextBlock Text="RGV参数" Style="{StaticResource screenTitle}"/>
|
|
<Grid Grid.Row="1">
|
|
<ScrollViewer>
|
|
<ListBox ItemsSource="{Binding RGVsContent}">
|
|
<ListBox.ItemTemplate>
|
|
<DataTemplate>
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="auto"/>
|
|
<ColumnDefinition Width="auto"/>
|
|
</Grid.ColumnDefinitions>
|
|
<!--RGV-->
|
|
<Border Grid.Column="1" Style="{StaticResource deviceBackGround}">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="auto"/>
|
|
<ColumnDefinition Width="auto"/>
|
|
<ColumnDefinition Width="auto"/>
|
|
<ColumnDefinition Width="auto"/>
|
|
<ColumnDefinition Width="auto"/>
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<WrapPanel>
|
|
<StackPanel Margin="50,0,50,0">
|
|
<TextBlock Text="操作模式" Style="{StaticResource txtRGVParaName}"/>
|
|
<TextBlock x:Name="RGVMode" Text="{Binding Receive_ModeContent}" Style="{StaticResource textStateColor}"/>
|
|
</StackPanel>
|
|
<StackPanel Grid.Column="1" Style="{StaticResource myPanel}">
|
|
<TextBlock Text="设备状态" Style="{StaticResource txtRGVParaName}"/>
|
|
<TextBlock x:Name="RGVDeviceState" Text="{Binding Receive_DeviceStateContent}" Style="{StaticResource textStateColor}"/>
|
|
</StackPanel>
|
|
<StackPanel Grid.Column="2" Style="{StaticResource myPanel}">
|
|
<TextBlock Text="运行状态" Style="{StaticResource txtRGVParaName}"/>
|
|
<TextBlock x:Name="RGVRunningState" Text="{Binding Receive_RunningStateContent}" Style="{StaticResource textStateColor}"/>
|
|
</StackPanel>
|
|
<StackPanel Grid.Column="3" Style="{StaticResource myPanel}">
|
|
<TextBlock Text="执行阶段" Style="{StaticResource txtRGVParaName}"/>
|
|
<TextBlock Text="{Binding Receive_PhaseContent}" Style="{StaticResource txtRGVParaValue}"/>
|
|
</StackPanel>
|
|
<StackPanel Grid.Column="4" Style="{StaticResource myPanel}">
|
|
<TextBlock Text="任务号" Style="{StaticResource txtRGVParaName}"/>
|
|
<TextBlock Text="{Binding Receive_TaskNumberContent}" Style="{StaticResource txtRGVParaValue}"/>
|
|
</StackPanel>
|
|
<StackPanel Grid.Column="5" Style="{StaticResource myPanel}">
|
|
<TextBlock Text="允许下发" Style="{StaticResource txtRGVParaName}"/>
|
|
<TextBlock x:Name="RGVPermission" Text="{Binding Receive_PermissionContent}" Style="{StaticResource textStateColor}"/>
|
|
</StackPanel>
|
|
<StackPanel Grid.Column="6" Style="{StaticResource myPanel}">
|
|
<TextBlock Text="载货状态" Style="{StaticResource txtRGVParaName}"/>
|
|
<TextBlock Text="{Binding Receive_LoadStateContent}" Style="{StaticResource txtRGVParaValue}"/>
|
|
</StackPanel>
|
|
<StackPanel Grid.Column="7" Style="{StaticResource myPanel}">
|
|
<TextBlock Text="当前层" Style="{StaticResource txtRGVParaName}"/>
|
|
<TextBlock Text="{Binding Receive_CurrentFloorContent}" Style="{StaticResource txtRGVParaValue}"/>
|
|
</StackPanel>
|
|
<StackPanel Grid.Column="8" Style="{StaticResource myPanel}">
|
|
<TextBlock Text="目标层" Style="{StaticResource txtRGVParaName}"/>
|
|
<TextBlock Text="{Binding Receive_TargetFloorContent}" Style="{StaticResource txtRGVParaValue}"/>
|
|
</StackPanel>
|
|
</WrapPanel>
|
|
|
|
</Grid>
|
|
</Border>
|
|
<Border Background="DarkOrange" Width="80" Height="80" CornerRadius="50" Margin="0,0,-50,0">
|
|
<Border.Effect>
|
|
<DropShadowEffect ShadowDepth="3" BlurRadius="10" Opacity=".7"/>
|
|
</Border.Effect>
|
|
<TextBlock Text="{Binding Number}" Foreground="White" FontSize="20" FontWeight="Bold" VerticalAlignment="Center" HorizontalAlignment="Center"/>
|
|
</Border>
|
|
</Grid>
|
|
|
|
</DataTemplate>
|
|
</ListBox.ItemTemplate>
|
|
</ListBox>
|
|
|
|
</ScrollViewer>
|
|
|
|
</Grid>
|
|
</Grid>
|
|
</Page>
|