一些优化:CAN和PLC地址的优化
This commit is contained in:
@@ -79,6 +79,7 @@
|
||||
<Grid Margin="3">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="60" />
|
||||
<RowDefinition Height="46" />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
@@ -152,7 +153,8 @@
|
||||
Margin="2,0"
|
||||
Command="{Binding CanLinConfigPromdCmd}"
|
||||
CommandParameter="Active"
|
||||
Foreground="White">
|
||||
Foreground="White"
|
||||
ToolTip="【激活】代表启用选择的CAN配置为当前的工况所使用,激活后程序运行中不可改变CAN配置">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock
|
||||
Margin="2,0"
|
||||
@@ -160,23 +162,68 @@
|
||||
FontFamily="/Assets/Fonts/#iconfont"
|
||||
FontSize="18"
|
||||
Text="" />
|
||||
<TextBlock
|
||||
VerticalAlignment="Center"
|
||||
FontSize="14"
|
||||
Text="启用" />
|
||||
<TextBlock VerticalAlignment="Center" FontSize="14">
|
||||
<TextBlock.Style>
|
||||
<Style TargetType="TextBlock">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding IsCanConfigProActive}" Value="True">
|
||||
<Setter Property="Text" Value="取消" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding IsCanConfigProActive}" Value="False">
|
||||
<Setter Property="Text" Value="激活" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</TextBlock.Style>
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
|
||||
</StackPanel>
|
||||
</materialDesign:Card>
|
||||
<materialDesign:Card
|
||||
Grid.Row="1"
|
||||
Margin="0,1,0,3"
|
||||
Background="{DynamicResource MaterialDesignLightBackground}"
|
||||
Foreground="{DynamicResource PrimaryHueLightForegroundBrush}"
|
||||
UniformCornerRadius="5">
|
||||
<Border CornerRadius="5">
|
||||
<Border.Style>
|
||||
<Style TargetType="Border">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding IsCanConfigProActive}" Value="True">
|
||||
<Setter Property="Background" Value="LimeGreen" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding IsCanConfigProActive}" Value="False">
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Border.Style>
|
||||
<TextBlock
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
FontSize="24"
|
||||
Foreground="Blue"
|
||||
Text="{Binding SelectCanLinConfigProConfigName}" />
|
||||
</Border>
|
||||
<!--<StackPanel
|
||||
Margin="5"
|
||||
HorizontalAlignment="Center"
|
||||
Orientation="Horizontal">
|
||||
|
||||
|
||||
</StackPanel>-->
|
||||
</materialDesign:Card>
|
||||
|
||||
<DataGrid
|
||||
x:Name="CANConfigDatagrid"
|
||||
Grid.Row="1"
|
||||
Grid.Row="2"
|
||||
AutoGenerateColumns="False"
|
||||
BorderBrush="Black"
|
||||
BorderThickness="1"
|
||||
FontWeight="Bold"
|
||||
IsHitTestVisible="{Binding IsCanConfigProActive}"
|
||||
IsHitTestVisible="{Binding IsCANConfigDatagridActive}"
|
||||
IsReadOnly="True"
|
||||
ItemsSource="{Binding ListCanLinConfigPro}"
|
||||
SelectionMode="Extended"
|
||||
@@ -407,23 +454,54 @@
|
||||
Text="" />
|
||||
</Border>
|
||||
|
||||
|
||||
<Button
|
||||
Margin="5,0"
|
||||
Command="{Binding CanOpCmd}"
|
||||
CommandParameter="SendTest1"
|
||||
Content="发送测试数据" />
|
||||
CommandParameter="CycleSend"
|
||||
Content="循环发送">
|
||||
<Button.Style>
|
||||
<Style BasedOn="{StaticResource MaterialDesignFlatDarkBgButton}" TargetType="Button">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding CanDriveService.ToomossCanDrive.IsCycleSend}" Value="true">
|
||||
<Setter Property="Background" Value="LimeGreen" />
|
||||
<Setter Property="Foreground" Value="White" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding CanDriveService.ToomossCanDrive.IsCycleSend}" Value="false">
|
||||
<Setter Property="Background" Value="Gray" />
|
||||
<Setter Property="Foreground" Value="White" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Button.Style>
|
||||
</Button>
|
||||
<Button
|
||||
Margin="5,0"
|
||||
Command="{Binding CanOpCmd}"
|
||||
CommandParameter="SendTest2"
|
||||
Content="发送测试数据" />
|
||||
CommandParameter="CycleRecive"
|
||||
Content="循环接收">
|
||||
<Button.Style>
|
||||
<Style BasedOn="{StaticResource MaterialDesignFlatDarkBgButton}" TargetType="Button">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding CanDriveService.ToomossCanDrive.IsCycleRevice}" Value="true">
|
||||
<Setter Property="Background" Value="LimeGreen" />
|
||||
<Setter Property="Foreground" Value="White" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding CanDriveService.ToomossCanDrive.IsCycleRevice}" Value="false">
|
||||
<Setter Property="Background" Value="Gray" />
|
||||
<Setter Property="Foreground" Value="White" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Button.Style>
|
||||
</Button>
|
||||
|
||||
<Button
|
||||
Margin="5,0"
|
||||
Background="Green"
|
||||
Command="{Binding CanOpCmd}"
|
||||
CommandParameter="Listen"
|
||||
Content="监听报文"
|
||||
Foreground="White" />
|
||||
CommandParameter="HandSend"
|
||||
Content="手动发送" />
|
||||
|
||||
</StackPanel>
|
||||
|
||||
</Grid>
|
||||
@@ -552,11 +630,18 @@
|
||||
<TextBlock FontWeight="Bold" Text="名称" />
|
||||
</DataGridTextColumn.Header>
|
||||
</DataGridTextColumn>-->
|
||||
<DataGridTextColumn Binding="{Binding Content}" IsReadOnly="True">
|
||||
<DataGridTextColumn Binding="{Binding SignalName}" IsReadOnly="True">
|
||||
<DataGridTextColumn.Header>
|
||||
<TextBlock FontWeight="Bold" Text="配置内容" />
|
||||
<TextBlock FontWeight="Bold" Text="信号内容" />
|
||||
</DataGridTextColumn.Header>
|
||||
</DataGridTextColumn>
|
||||
<DataGridTextColumn Binding="{Binding MsgFrameName}" IsReadOnly="True">
|
||||
<DataGridTextColumn.Header>
|
||||
<TextBlock FontWeight="Bold" Text="消息名称" />
|
||||
</DataGridTextColumn.Header>
|
||||
</DataGridTextColumn>
|
||||
|
||||
|
||||
<DataGridTextColumn Binding="{Binding DefautValue}">
|
||||
<DataGridTextColumn.Header>
|
||||
<TextBlock FontWeight="Bold" Text="默认值" />
|
||||
@@ -693,11 +778,17 @@
|
||||
<TextBlock FontWeight="Bold" Text="名称" />
|
||||
</DataGridTextColumn.Header>
|
||||
</DataGridTextColumn>-->
|
||||
<DataGridTextColumn Binding="{Binding Content}" IsReadOnly="True">
|
||||
<DataGridTextColumn Binding="{Binding SignalName}" IsReadOnly="True">
|
||||
<DataGridTextColumn.Header>
|
||||
<TextBlock FontWeight="Bold" Text="配置内容" />
|
||||
<TextBlock FontWeight="Bold" Text="信号名称" />
|
||||
</DataGridTextColumn.Header>
|
||||
</DataGridTextColumn>
|
||||
<DataGridTextColumn Binding="{Binding MsgFrameName}" IsReadOnly="True">
|
||||
<DataGridTextColumn.Header>
|
||||
<TextBlock FontWeight="Bold" Text="消息名称" />
|
||||
</DataGridTextColumn.Header>
|
||||
</DataGridTextColumn>
|
||||
|
||||
<DataGridTextColumn Binding="{Binding DefautValue}">
|
||||
<DataGridTextColumn.Header>
|
||||
<TextBlock FontWeight="Bold" Text="默认值" />
|
||||
|
||||
Reference in New Issue
Block a user