742 lines
36 KiB
XML
742 lines
36 KiB
XML
<UserControl
|
|
x:Class="CapMachine.Wpf.Views.ZlgLinDriveConfigView"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
|
|
xmlns:local="clr-namespace:CapMachine.Wpf.Views"
|
|
xmlns:localEx="clr-namespace:CapMachine.Wpf"
|
|
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:prism="http://prismlibrary.com/"
|
|
d:DesignHeight="980"
|
|
d:DesignWidth="1920"
|
|
prism:ViewModelLocator.AutoWireViewModel="True"
|
|
mc:Ignorable="d">
|
|
<UserControl.Resources>
|
|
<localEx:BindingProxy x:Key="Proxy" Data="{Binding}" />
|
|
</UserControl.Resources>
|
|
<Grid>
|
|
<Grid.Resources>
|
|
<Style
|
|
x:Key="TextBoxStyle"
|
|
BasedOn="{StaticResource MaterialDesignTextBoxBase}"
|
|
TargetType="TextBox">
|
|
<Setter Property="FontSize" Value="18" />
|
|
<Setter Property="VerticalAlignment" Value="Center" />
|
|
<Setter Property="Margin" Value="10,0" />
|
|
<Setter Property="Width" Value="120" />
|
|
</Style>
|
|
<Style x:Key="TextBlockStyle" TargetType="TextBlock">
|
|
<Setter Property="Width" Value="110" />
|
|
<Setter Property="FontSize" Value="18" />
|
|
<Setter Property="HorizontalAlignment" Value="Center" />
|
|
<Setter Property="VerticalAlignment" Value="Center" />
|
|
<Setter Property="Margin" Value="5,0" />
|
|
</Style>
|
|
</Grid.Resources>
|
|
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="6*" />
|
|
<ColumnDefinition Width="6*" />
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="60" />
|
|
<RowDefinition />
|
|
</Grid.RowDefinitions>
|
|
|
|
<materialDesign:Card
|
|
Margin="3"
|
|
Background="{DynamicResource MaterialDesignLightBackground}"
|
|
Foreground="{DynamicResource PrimaryHueLightForegroundBrush}"
|
|
UniformCornerRadius="5"
|
|
Grid.ColumnSpan="2">
|
|
<StackPanel Orientation="Horizontal">
|
|
|
|
<TextBlock
|
|
Margin="10,0,10,0"
|
|
VerticalAlignment="Center"
|
|
FontFamily="/Assets/Fonts/#iconfont"
|
|
FontSize="30"
|
|
Text="" />
|
|
|
|
<TextBlock
|
|
Margin="5,0"
|
|
VerticalAlignment="Center"
|
|
FontSize="30"
|
|
FontWeight="Bold"
|
|
Text="LIN LDF 文件路径:" />
|
|
|
|
<Border
|
|
Width="800"
|
|
Margin="5,8"
|
|
Padding="15,5"
|
|
Background="LightGray"
|
|
CornerRadius="5">
|
|
<TextBlock
|
|
VerticalAlignment="Center"
|
|
FontSize="22"
|
|
Text="{Binding CurrentLdfPath}" />
|
|
</Border>
|
|
|
|
<Button Command="{Binding LoadLdfCmd}" Foreground="White">
|
|
<StackPanel Orientation="Horizontal">
|
|
<TextBlock
|
|
Margin="2,0"
|
|
VerticalAlignment="Center"
|
|
FontFamily="/Assets/Fonts/#iconfont"
|
|
FontSize="18"
|
|
Text=" " />
|
|
<TextBlock VerticalAlignment="Center" FontSize="14" Text="选择Ldf文件" />
|
|
</StackPanel>
|
|
</Button>
|
|
|
|
<Button
|
|
Margin="15,0,2,0"
|
|
Command="{Binding LinOpCmd}"
|
|
CommandParameter="Open"
|
|
Foreground="White">
|
|
<TextBlock FontSize="14" Text="打开" />
|
|
</Button>
|
|
<Button
|
|
Margin="2,0"
|
|
Command="{Binding LinOpCmd}"
|
|
CommandParameter="Close"
|
|
Foreground="White">
|
|
<TextBlock FontSize="14" Text="关闭" />
|
|
</Button>
|
|
<Button
|
|
Margin="2,0"
|
|
Command="{Binding LinOpCmd}"
|
|
CommandParameter="Parse"
|
|
Foreground="White">
|
|
<TextBlock FontSize="14" Text="解析" />
|
|
</Button>
|
|
<Button
|
|
Margin="2,0"
|
|
Command="{Binding LinOpCmd}"
|
|
CommandParameter="Save"
|
|
Foreground="White">
|
|
<TextBlock FontSize="14" Text="保存" />
|
|
</Button>
|
|
</StackPanel>
|
|
</materialDesign:Card>
|
|
|
|
<Grid Grid.Row="1" Grid.Column="0">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="400" />
|
|
<ColumnDefinition />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<materialDesign:Card
|
|
Grid.Column="0"
|
|
Margin="3"
|
|
Background="{DynamicResource MaterialDesignLightBackground}"
|
|
Foreground="{DynamicResource PrimaryHueLightForegroundBrush}"
|
|
UniformCornerRadius="5">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="40" />
|
|
<RowDefinition Height="40" />
|
|
<RowDefinition />
|
|
</Grid.RowDefinitions>
|
|
|
|
<TextBlock
|
|
Margin="10,0"
|
|
VerticalAlignment="Center"
|
|
FontSize="18"
|
|
FontWeight="Bold"
|
|
Text="配置程序" />
|
|
|
|
<StackPanel Grid.Row="1" Orientation="Horizontal">
|
|
<StackPanel.Resources>
|
|
<Style
|
|
x:Key="btnStyle"
|
|
BasedOn="{StaticResource MaterialDesignFlatSecondaryLightBgButton}"
|
|
TargetType="Button">
|
|
<Setter Property="Margin" Value="5,2" />
|
|
<Setter Property="Foreground" Value="White" />
|
|
</Style>
|
|
</StackPanel.Resources>
|
|
<Button
|
|
Command="{Binding LinConfigProCmd}"
|
|
CommandParameter="Add"
|
|
Style="{StaticResource btnStyle}">
|
|
<StackPanel Orientation="Horizontal">
|
|
<TextBlock
|
|
Margin="2,0"
|
|
VerticalAlignment="Center"
|
|
FontFamily="/Assets/Fonts/#iconfont"
|
|
FontSize="18"
|
|
Text="" />
|
|
<TextBlock
|
|
VerticalAlignment="Center"
|
|
FontSize="14"
|
|
Text="新建" />
|
|
</StackPanel>
|
|
</Button>
|
|
<Button
|
|
Command="{Binding LinConfigProCmd}"
|
|
CommandParameter="Edit"
|
|
Style="{StaticResource btnStyle}">
|
|
<StackPanel Orientation="Horizontal">
|
|
<TextBlock
|
|
Margin="2,0"
|
|
VerticalAlignment="Center"
|
|
FontFamily="/Assets/Fonts/#iconfont"
|
|
FontSize="18"
|
|
Text="" />
|
|
<TextBlock
|
|
VerticalAlignment="Center"
|
|
FontSize="14"
|
|
Text="修改" />
|
|
</StackPanel>
|
|
</Button>
|
|
<Button
|
|
Command="{Binding LinConfigProCmd}"
|
|
CommandParameter="Delete"
|
|
Style="{StaticResource btnStyle}">
|
|
<StackPanel Orientation="Horizontal">
|
|
<TextBlock
|
|
Margin="2,0"
|
|
VerticalAlignment="Center"
|
|
FontFamily="/Assets/Fonts/#iconfont"
|
|
FontSize="18"
|
|
Text="" />
|
|
<TextBlock
|
|
VerticalAlignment="Center"
|
|
FontSize="14"
|
|
Text="删除" />
|
|
</StackPanel>
|
|
</Button>
|
|
<Button
|
|
Command="{Binding LinConfigProCmd}"
|
|
CommandParameter="Active"
|
|
Style="{StaticResource btnStyle}">
|
|
<StackPanel Orientation="Horizontal">
|
|
<TextBlock
|
|
Margin="2,0"
|
|
VerticalAlignment="Center"
|
|
FontFamily="/Assets/Fonts/#iconfont"
|
|
FontSize="18"
|
|
Text="" />
|
|
<TextBlock
|
|
VerticalAlignment="Center"
|
|
FontSize="14"
|
|
Text="激活" />
|
|
</StackPanel>
|
|
</Button>
|
|
</StackPanel>
|
|
|
|
<DataGrid
|
|
x:Name="LinConfigDatagrid"
|
|
Grid.Row="2"
|
|
AutoGenerateColumns="False"
|
|
CanUserAddRows="False"
|
|
HeadersVisibility="Column"
|
|
IsEnabled="{Binding IsLINConfigDatagridActive}"
|
|
ItemsSource="{Binding ListCanLinConfigPro}"
|
|
SelectedItem="{Binding SelectCanLinConfigPro, Mode=TwoWay}">
|
|
<i:Interaction.Triggers>
|
|
<i:EventTrigger EventName="SelectionChanged">
|
|
<prism:InvokeCommandAction
|
|
Command="{Binding LinConfigProGridSelectionChangedCmd}"
|
|
CommandParameter="{Binding ElementName=LinConfigDatagrid, Path=SelectedItem}" />
|
|
</i:EventTrigger>
|
|
</i:Interaction.Triggers>
|
|
|
|
<DataGrid.Columns>
|
|
<DataGridTextColumn Binding="{Binding ConfigName}" Header="名称" Width="*" />
|
|
</DataGrid.Columns>
|
|
</DataGrid>
|
|
</Grid>
|
|
</materialDesign:Card>
|
|
|
|
<materialDesign:Card
|
|
Grid.Column="1"
|
|
Margin="3"
|
|
Background="{DynamicResource MaterialDesignLightBackground}"
|
|
Foreground="{DynamicResource PrimaryHueLightForegroundBrush}"
|
|
UniformCornerRadius="5">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="40" />
|
|
<RowDefinition Height="60" />
|
|
<RowDefinition Height="40" />
|
|
<RowDefinition Height="200" />
|
|
<RowDefinition Height="40" />
|
|
<RowDefinition Height="220" />
|
|
<RowDefinition Height="40" />
|
|
<RowDefinition />
|
|
</Grid.RowDefinitions>
|
|
|
|
<TextBlock
|
|
Margin="10,0"
|
|
VerticalAlignment="Center"
|
|
FontSize="18"
|
|
FontWeight="Bold"
|
|
Text="参数操作" />
|
|
|
|
<StackPanel
|
|
Grid.Row="1"
|
|
Margin="0,0,15,0"
|
|
HorizontalAlignment="Right"
|
|
Orientation="Horizontal">
|
|
|
|
<Button
|
|
Margin="5,0"
|
|
Command="{Binding LinOpCmd}"
|
|
CommandParameter="Open"
|
|
Foreground="White">
|
|
<StackPanel Orientation="Horizontal">
|
|
<TextBlock
|
|
Margin="2,0"
|
|
VerticalAlignment="Center"
|
|
FontFamily="/Assets/Fonts/#iconfont"
|
|
FontSize="18"
|
|
Text="" />
|
|
<TextBlock
|
|
VerticalAlignment="Center"
|
|
FontSize="14"
|
|
Text="{Binding ConnectButtonText}" />
|
|
</StackPanel>
|
|
</Button>
|
|
<Button
|
|
Margin="5,0"
|
|
Command="{Binding LinOpCmd}"
|
|
CommandParameter="Close"
|
|
Foreground="White">
|
|
<StackPanel Orientation="Horizontal">
|
|
<TextBlock
|
|
Margin="2,0"
|
|
VerticalAlignment="Center"
|
|
FontFamily="/Assets/Fonts/#iconfont"
|
|
FontSize="18"
|
|
Text="" />
|
|
<TextBlock
|
|
VerticalAlignment="Center"
|
|
FontSize="14"
|
|
Text="{Binding CloseButtonText}" />
|
|
</StackPanel>
|
|
</Button>
|
|
<Button
|
|
Margin="5,0"
|
|
Command="{Binding LinOpCmd}"
|
|
CommandParameter="Parse"
|
|
Foreground="White">
|
|
<StackPanel Orientation="Horizontal">
|
|
<TextBlock
|
|
Margin="2,0"
|
|
VerticalAlignment="Center"
|
|
FontFamily="/Assets/Fonts/#iconfont"
|
|
FontSize="18"
|
|
Text="" />
|
|
<TextBlock
|
|
VerticalAlignment="Center"
|
|
FontSize="14"
|
|
Text="解析LDF" />
|
|
</StackPanel>
|
|
</Button>
|
|
<Button
|
|
Margin="5,0"
|
|
Command="{Binding LinOpCmd}"
|
|
CommandParameter="Save"
|
|
Foreground="White">
|
|
<StackPanel Orientation="Horizontal">
|
|
<TextBlock
|
|
Margin="2,0"
|
|
VerticalAlignment="Center"
|
|
FontFamily="/Assets/Fonts/#iconfont"
|
|
FontSize="18"
|
|
Text="" />
|
|
<TextBlock
|
|
VerticalAlignment="Center"
|
|
FontSize="14"
|
|
Text="保存配置" />
|
|
</StackPanel>
|
|
</Button>
|
|
|
|
</StackPanel>
|
|
|
|
<TextBlock
|
|
Grid.Row="2"
|
|
Margin="10,0"
|
|
VerticalAlignment="Center"
|
|
FontSize="18"
|
|
FontWeight="Bold"
|
|
Text="状态" />
|
|
|
|
<Grid Grid.Row="3">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition />
|
|
<RowDefinition />
|
|
<RowDefinition />
|
|
<RowDefinition />
|
|
</Grid.RowDefinitions>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition />
|
|
<ColumnDefinition />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<StackPanel Orientation="Horizontal">
|
|
<TextBlock
|
|
Margin="10,0,2,0"
|
|
VerticalAlignment="Center"
|
|
FontFamily="/Assets/Fonts/#iconfont"
|
|
FontSize="20"
|
|
Text="" />
|
|
<TextBlock
|
|
Width="80"
|
|
Style="{StaticResource TextBlockStyle}"
|
|
Text="报文状态:" />
|
|
|
|
<Border
|
|
Width="50"
|
|
Margin="0,12"
|
|
BorderThickness="1"
|
|
CornerRadius="5">
|
|
<Border.Style>
|
|
<Style TargetType="Border">
|
|
<Setter Property="Background" Value="Gray" />
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding ZlgLinDriveService.IsSendOk}" Value="true">
|
|
<Setter Property="Background" Value="LimeGreen" />
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</Border.Style>
|
|
<TextBlock
|
|
Margin="5"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Foreground="White"
|
|
Text="发送" />
|
|
</Border>
|
|
|
|
<Border
|
|
Width="50"
|
|
Margin="2,12"
|
|
BorderThickness="1"
|
|
CornerRadius="5">
|
|
<Border.Style>
|
|
<Style TargetType="Border">
|
|
<Setter Property="Background" Value="Gray" />
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding ZlgLinDriveService.IsReviceOk}" Value="true">
|
|
<Setter Property="Background" Value="LimeGreen" />
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</Border.Style>
|
|
<TextBlock
|
|
Margin="5"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Foreground="White"
|
|
Text="接收" />
|
|
</Border>
|
|
</StackPanel>
|
|
|
|
<StackPanel Grid.Column="1" Orientation="Horizontal">
|
|
<TextBlock
|
|
Margin="10,0,2,0"
|
|
VerticalAlignment="Center"
|
|
FontFamily="/Assets/Fonts/#iconfont"
|
|
FontSize="20"
|
|
Text="" />
|
|
<TextBlock
|
|
Width="90"
|
|
Style="{StaticResource TextBlockStyle}"
|
|
Text="启用调度表:" />
|
|
<ToggleButton
|
|
Width="40"
|
|
Margin="2,2"
|
|
Command="{Binding SchEnableCmd}"
|
|
IsChecked="{Binding CurrentSchEnable, Mode=TwoWay}"
|
|
Style="{StaticResource MaterialDesignSwitchToggleButton}"
|
|
ToolTip="启用调度表" />
|
|
</StackPanel>
|
|
|
|
<StackPanel Grid.Row="1" Orientation="Horizontal">
|
|
<TextBlock
|
|
Margin="10,0,2,0"
|
|
VerticalAlignment="Center"
|
|
FontFamily="/Assets/Fonts/#iconfont"
|
|
FontSize="18"
|
|
Text="" />
|
|
<TextBlock Style="{StaticResource TextBlockStyle}" Text="LIN连接状态" />
|
|
<Border
|
|
Width="50"
|
|
Margin="5,10"
|
|
Padding="5"
|
|
CornerRadius="3">
|
|
<Border.Style>
|
|
<Style TargetType="Border">
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding ZlgLinDriveService.OpenState}" Value="True">
|
|
<Setter Property="Background" Value="LimeGreen" />
|
|
</DataTrigger>
|
|
<DataTrigger Binding="{Binding ZlgLinDriveService.OpenState}" Value="False">
|
|
<Setter Property="Background" Value="Gray" />
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</Border.Style>
|
|
<TextBlock
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Foreground="White"
|
|
Text="连接" />
|
|
</Border>
|
|
</StackPanel>
|
|
|
|
<StackPanel
|
|
Grid.Row="2"
|
|
Grid.Column="0"
|
|
Orientation="Horizontal">
|
|
<Button
|
|
Margin="15,0,5,0"
|
|
Command="{Binding LinOpCmd}"
|
|
CommandParameter="CycleSend">
|
|
<Button.Style>
|
|
<Style BasedOn="{StaticResource MaterialDesignFlatDarkBgButton}" TargetType="Button">
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding ZlgLinDriveService.IsCycleSend}" Value="true">
|
|
<Setter Property="Background" Value="LimeGreen" />
|
|
<Setter Property="Foreground" Value="White" />
|
|
</DataTrigger>
|
|
<DataTrigger Binding="{Binding ZlgLinDriveService.IsCycleSend}" Value="false">
|
|
<Setter Property="Background" Value="Gray" />
|
|
<Setter Property="Foreground" Value="White" />
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</Button.Style>
|
|
<StackPanel Orientation="Horizontal">
|
|
<TextBlock
|
|
Margin="2,0"
|
|
VerticalAlignment="Center"
|
|
FontFamily="/Assets/Fonts/#iconfont"
|
|
FontSize="18"
|
|
Text="" />
|
|
<TextBlock
|
|
VerticalAlignment="Center"
|
|
FontSize="14"
|
|
Text="循环发送" />
|
|
</StackPanel>
|
|
</Button>
|
|
<Button
|
|
Margin="5,0"
|
|
Command="{Binding LinOpCmd}"
|
|
CommandParameter="CycleRecive">
|
|
<Button.Style>
|
|
<Style BasedOn="{StaticResource MaterialDesignFlatDarkBgButton}" TargetType="Button">
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding ZlgLinDriveService.IsCycleRevice}" Value="true">
|
|
<Setter Property="Background" Value="LimeGreen" />
|
|
<Setter Property="Foreground" Value="White" />
|
|
</DataTrigger>
|
|
<DataTrigger Binding="{Binding ZlgLinDriveService.IsCycleRevice}" Value="false">
|
|
<Setter Property="Background" Value="Gray" />
|
|
<Setter Property="Foreground" Value="White" />
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</Button.Style>
|
|
<StackPanel Orientation="Horizontal">
|
|
<TextBlock
|
|
Margin="2,0"
|
|
VerticalAlignment="Center"
|
|
FontFamily="/Assets/Fonts/#iconfont"
|
|
FontSize="18"
|
|
Text="" />
|
|
<TextBlock
|
|
VerticalAlignment="Center"
|
|
FontSize="14"
|
|
Text="循环接收" />
|
|
</StackPanel>
|
|
</Button>
|
|
</StackPanel>
|
|
</Grid>
|
|
|
|
<TextBlock
|
|
Grid.Row="4"
|
|
Margin="10,0"
|
|
VerticalAlignment="Center"
|
|
FontSize="18"
|
|
FontWeight="Bold"
|
|
Text="参数信息" />
|
|
|
|
<Grid Grid.Row="5">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition />
|
|
<RowDefinition />
|
|
</Grid.RowDefinitions>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition />
|
|
<ColumnDefinition />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<StackPanel Orientation="Horizontal">
|
|
<TextBlock
|
|
Margin="10,0,10,0"
|
|
VerticalAlignment="Center"
|
|
FontFamily="/Assets/Fonts/#iconfont"
|
|
FontSize="18"
|
|
Text="" />
|
|
<TextBlock Style="{StaticResource TextBlockStyle}" Text="波特率" />
|
|
<TextBox Style="{StaticResource TextBoxStyle}" Text="{Binding LinBaudRate, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
|
|
</StackPanel>
|
|
|
|
<StackPanel Grid.Column="1" Orientation="Horizontal">
|
|
<TextBlock
|
|
Margin="10,0,10,0"
|
|
VerticalAlignment="Center"
|
|
FontFamily="/Assets/Fonts/#iconfont"
|
|
FontSize="18"
|
|
Text="" />
|
|
<TextBlock Style="{StaticResource TextBlockStyle}" Text="循环周期(ms)" />
|
|
<TextBox Style="{StaticResource TextBoxStyle}" Text="{Binding CurrentCycle, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
|
|
</StackPanel>
|
|
</Grid>
|
|
|
|
<TextBlock
|
|
Grid.Row="6"
|
|
Margin="10,0"
|
|
VerticalAlignment="Center"
|
|
FontSize="18"
|
|
FontWeight="Bold"
|
|
Text="写入读取操作" />
|
|
|
|
<Grid Grid.Row="7">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="40" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<StackPanel
|
|
Margin="0,0,15,0"
|
|
HorizontalAlignment="Right"
|
|
Orientation="Horizontal">
|
|
<Button
|
|
Margin="5,0"
|
|
Command="{Binding OpenRwDialogCmd}"
|
|
Foreground="White"
|
|
IsEnabled="{Binding IsRwEditable}">
|
|
<StackPanel Orientation="Horizontal">
|
|
<TextBlock
|
|
Margin="2,0"
|
|
VerticalAlignment="Center"
|
|
FontFamily="/Assets/Fonts/#iconfont"
|
|
FontSize="18"
|
|
Text="" />
|
|
<TextBlock
|
|
VerticalAlignment="Center"
|
|
FontSize="14"
|
|
Text="读写设置" />
|
|
</StackPanel>
|
|
</Button>
|
|
|
|
<Button
|
|
Margin="15,0,0,0"
|
|
Command="{Binding ScheduleConfigCmd}"
|
|
Foreground="White">
|
|
<StackPanel Orientation="Horizontal">
|
|
<TextBlock
|
|
Margin="2,0"
|
|
VerticalAlignment="Center"
|
|
FontFamily="/Assets/Fonts/#iconfont"
|
|
FontSize="18"
|
|
Text="" />
|
|
<TextBlock
|
|
VerticalAlignment="Center"
|
|
FontSize="14"
|
|
Text="调度表" />
|
|
</StackPanel>
|
|
</Button>
|
|
</StackPanel>
|
|
|
|
<TextBlock
|
|
Grid.Row="1"
|
|
Margin="10"
|
|
VerticalAlignment="Center"
|
|
FontSize="16"
|
|
Text="提示:点击【读写设置】在弹窗中统一管理写入/读取配置(含规则与默认值)。"
|
|
TextWrapping="Wrap" />
|
|
</Grid>
|
|
</Grid>
|
|
</materialDesign:Card>
|
|
</Grid>
|
|
|
|
<materialDesign:Card
|
|
Grid.Row="1"
|
|
Grid.Column="1"
|
|
Margin="3"
|
|
Background="{DynamicResource MaterialDesignLightBackground}"
|
|
Foreground="{DynamicResource PrimaryHueLightForegroundBrush}"
|
|
UniformCornerRadius="5">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="40" />
|
|
<RowDefinition />
|
|
</Grid.RowDefinitions>
|
|
|
|
<TextBlock
|
|
Margin="10,0"
|
|
VerticalAlignment="Center"
|
|
FontSize="18"
|
|
FontWeight="Bold"
|
|
Text="信号" />
|
|
|
|
<DataGrid
|
|
Grid.Row="1"
|
|
AutoGenerateColumns="False"
|
|
CanUserAddRows="False"
|
|
HeadersVisibility="Column"
|
|
IsReadOnly="True"
|
|
ItemsSource="{Binding ZlgLinDriveService.ListLinLdfModel}">
|
|
<DataGrid.RowStyle>
|
|
<Style TargetType="DataGridRow">
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding IsSeletedInfo}" Value="1">
|
|
<Setter Property="Background" Value="LightGreen" />
|
|
</DataTrigger>
|
|
<DataTrigger Binding="{Binding IsSeletedInfo}" Value="2">
|
|
<Setter Property="Background" Value="SkyBlue" />
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</DataGrid.RowStyle>
|
|
<DataGrid.Columns>
|
|
<DataGridTextColumn Width="200" Binding="{Binding MsgName}">
|
|
<DataGridTextColumn.Header>
|
|
<TextBlock FontWeight="Bold" Text="帧名称" />
|
|
</DataGridTextColumn.Header>
|
|
</DataGridTextColumn>
|
|
<DataGridTextColumn Width="140" Binding="{Binding Name}">
|
|
<DataGridTextColumn.Header>
|
|
<TextBlock FontWeight="Bold" Text="中文名称" />
|
|
</DataGridTextColumn.Header>
|
|
</DataGridTextColumn>
|
|
<DataGridTextColumn Width="*" Binding="{Binding SignalName}">
|
|
<DataGridTextColumn.Header>
|
|
<TextBlock FontWeight="Bold" Text="信号名称" />
|
|
</DataGridTextColumn.Header>
|
|
</DataGridTextColumn>
|
|
<DataGridTextColumn Width="90" Binding="{Binding SignalUnit}">
|
|
<DataGridTextColumn.Header>
|
|
<TextBlock FontWeight="Bold" Text="单位" />
|
|
</DataGridTextColumn.Header>
|
|
</DataGridTextColumn>
|
|
<DataGridTextColumn Width="150" Binding="{Binding SignalRtValue}">
|
|
<DataGridTextColumn.Header>
|
|
<TextBlock FontWeight="Bold" Text="实时值" />
|
|
</DataGridTextColumn.Header>
|
|
</DataGridTextColumn>
|
|
</DataGrid.Columns>
|
|
</DataGrid>
|
|
</Grid>
|
|
</materialDesign:Card>
|
|
</Grid>
|
|
</UserControl>
|