更改
This commit is contained in:
143
CapMachine.Wpf/Views/DialogZlgCANFDSchConfigView.xaml
Normal file
143
CapMachine.Wpf/Views/DialogZlgCANFDSchConfigView.xaml
Normal file
@@ -0,0 +1,143 @@
|
||||
<UserControl
|
||||
x:Class="CapMachine.Wpf.Views.DialogZlgCANFDSchConfigView"
|
||||
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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:prism="http://prismlibrary.com/"
|
||||
Width="1000"
|
||||
Height="800"
|
||||
mc:Ignorable="d">
|
||||
<UserControl.Resources>
|
||||
<localEx:BindingProxy x:Key="Proxy" Data="{Binding}" />
|
||||
<Style x:Key="myHeaderStyle" TargetType="{x:Type GridViewColumnHeader}">
|
||||
<Setter Property="FontSize" Value="24" />
|
||||
<Setter Property="Width" Value="218" />
|
||||
</Style>
|
||||
<Style x:Key="myHeaderStyle1" TargetType="{x:Type GridViewColumnHeader}">
|
||||
<Setter Property="FontSize" Value="16" />
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="BorderThickness" Value="0" />
|
||||
<Setter Property="BorderBrush" Value="Transparent" />
|
||||
</Style>
|
||||
</UserControl.Resources>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="60" />
|
||||
<RowDefinition />
|
||||
<RowDefinition Height="auto" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<StackPanel HorizontalAlignment="Left" Orientation="Horizontal">
|
||||
<Button
|
||||
Margin="10,0"
|
||||
Command="{Binding OpCmd}"
|
||||
CommandParameter="Delete"
|
||||
FontWeight="Bold"
|
||||
Foreground="#404040"
|
||||
Style="{StaticResource MaterialDesignFlatAccentBgButton}">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock
|
||||
Margin="0,0,5,0"
|
||||
VerticalAlignment="Center"
|
||||
FontFamily="/Assets/Fonts/#iconfont"
|
||||
FontSize="14"
|
||||
Foreground="#404040"
|
||||
Text="" />
|
||||
<TextBlock
|
||||
VerticalAlignment="Center"
|
||||
FontSize="14"
|
||||
Text="删除" />
|
||||
</StackPanel>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel
|
||||
Margin="30,0"
|
||||
HorizontalAlignment="Right"
|
||||
Orientation="Horizontal">
|
||||
<TextBlock
|
||||
Margin="10,0,5,0"
|
||||
VerticalAlignment="Center"
|
||||
FontFamily="/Assets/Fonts/#iconfont"
|
||||
FontSize="22"
|
||||
Text="" />
|
||||
<TextBlock
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
FontSize="20"
|
||||
Text="报文发送方式:"
|
||||
TextAlignment="Center" />
|
||||
<ComboBox
|
||||
Width="120"
|
||||
DisplayMemberPath="Text"
|
||||
FontSize="20"
|
||||
ItemsSource="{Binding SendOrderCbxItems}"
|
||||
SelectedValue="{Binding CurSendOrder, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
SelectedValuePath="Key" />
|
||||
|
||||
</StackPanel>
|
||||
|
||||
<Grid Grid.Row="1">
|
||||
<DataGrid
|
||||
x:Name="MainDatagrid"
|
||||
Margin="5"
|
||||
AutoGenerateColumns="False"
|
||||
CanUserAddRows="False"
|
||||
HeadersVisibility="Column"
|
||||
ItemsSource="{Binding ListCANFdScheduleConfigDto}"
|
||||
SelectionMode="Extended"
|
||||
SelectionUnit="FullRow">
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn
|
||||
Width="260"
|
||||
Binding="{Binding MsgName}"
|
||||
Header="消息名"
|
||||
IsReadOnly="True" />
|
||||
|
||||
<DataGridTextColumn
|
||||
Width="100"
|
||||
Binding="{Binding Cycle}"
|
||||
Header="周期" />
|
||||
|
||||
<DataGridTemplateColumn Width="160" Header="调度器序号">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<ComboBox
|
||||
DisplayMemberPath="Text"
|
||||
ItemsSource="{Binding Source={StaticResource Proxy}, Path=Data.SchTabIndexCbxItems}"
|
||||
SelectedValue="{Binding SchTabIndex, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
SelectedValuePath="Key" />
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
</DataGrid.Columns>
|
||||
|
||||
<i:Interaction.Triggers>
|
||||
<i:EventTrigger EventName="SelectionChanged">
|
||||
<prism:InvokeCommandAction Command="{Binding GridSelectionChangedCmd}" CommandParameter="{Binding ElementName=MainDatagrid, Path=SelectedItem}" />
|
||||
</i:EventTrigger>
|
||||
</i:Interaction.Triggers>
|
||||
</DataGrid>
|
||||
</Grid>
|
||||
|
||||
<StackPanel
|
||||
Grid.Row="2"
|
||||
HorizontalAlignment="Right"
|
||||
Orientation="Horizontal">
|
||||
<Button
|
||||
Margin="10,10"
|
||||
Command="{Binding SaveCmd}"
|
||||
Content="确定"
|
||||
Foreground="White" />
|
||||
<Button
|
||||
Margin="10,0"
|
||||
Command="{Binding CancelCmd}"
|
||||
Content="取消"
|
||||
Foreground="White" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
18
CapMachine.Wpf/Views/DialogZlgCANFDSchConfigView.xaml.cs
Normal file
18
CapMachine.Wpf/Views/DialogZlgCANFDSchConfigView.xaml.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace CapMachine.Wpf.Views
|
||||
{
|
||||
/// <summary>
|
||||
/// DialogZlgCANFDSchConfigView.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class DialogZlgCANFDSchConfigView : UserControl
|
||||
{
|
||||
/// <summary>
|
||||
/// 构造函数。
|
||||
/// </summary>
|
||||
public DialogZlgCANFDSchConfigView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
180
CapMachine.Wpf/Views/DialogZlgCANSchConfigView.xaml
Normal file
180
CapMachine.Wpf/Views/DialogZlgCANSchConfigView.xaml
Normal file
@@ -0,0 +1,180 @@
|
||||
<UserControl
|
||||
x:Class="CapMachine.Wpf.Views.DialogZlgCANSchConfigView"
|
||||
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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:prism="http://prismlibrary.com/"
|
||||
Width="1000"
|
||||
Height="800"
|
||||
mc:Ignorable="d">
|
||||
<UserControl.Resources>
|
||||
<localEx:BindingProxy x:Key="Proxy" Data="{Binding}" />
|
||||
<Style x:Key="myHeaderStyle" TargetType="{x:Type GridViewColumnHeader}">
|
||||
<Setter Property="FontSize" Value="24" />
|
||||
<Setter Property="Width" Value="218" />
|
||||
</Style>
|
||||
<Style x:Key="myHeaderStyle1" TargetType="{x:Type GridViewColumnHeader}">
|
||||
<Setter Property="FontSize" Value="16" />
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="BorderThickness" Value="0" />
|
||||
<Setter Property="BorderBrush" Value="Transparent" />
|
||||
</Style>
|
||||
</UserControl.Resources>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="60" />
|
||||
<RowDefinition />
|
||||
<RowDefinition Height="auto" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<StackPanel HorizontalAlignment="Left" Orientation="Horizontal">
|
||||
<!--<Button
|
||||
Margin="10,0"
|
||||
Command="{Binding CopyCmd}"
|
||||
FontWeight="Bold"
|
||||
Foreground="#404040"
|
||||
Style="{StaticResource MaterialDesignFlatAccentBgButton}">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock
|
||||
VerticalAlignment="Center"
|
||||
FontFamily="/Assets/Fonts/#iconfont"
|
||||
FontSize="14"
|
||||
Foreground="#404040"
|
||||
Text="" />
|
||||
<TextBlock
|
||||
VerticalAlignment="Center"
|
||||
FontSize="14"
|
||||
Text="复制" />
|
||||
</StackPanel>
|
||||
</Button>-->
|
||||
<Button
|
||||
Margin="10,0"
|
||||
Command="{Binding OpCmd}"
|
||||
CommandParameter="Delete"
|
||||
FontWeight="Bold"
|
||||
Foreground="#404040"
|
||||
Style="{StaticResource MaterialDesignFlatAccentBgButton}">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock
|
||||
Margin="0,0,5,0"
|
||||
VerticalAlignment="Center"
|
||||
FontFamily="/Assets/Fonts/#iconfont"
|
||||
FontSize="14"
|
||||
Foreground="#404040"
|
||||
Text="" />
|
||||
<TextBlock
|
||||
VerticalAlignment="Center"
|
||||
FontSize="14"
|
||||
Text="删除" />
|
||||
</StackPanel>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel
|
||||
Margin="30,0"
|
||||
HorizontalAlignment="Right"
|
||||
Orientation="Horizontal">
|
||||
<TextBlock
|
||||
Margin="10,0,5,0"
|
||||
VerticalAlignment="Center"
|
||||
FontFamily="/Assets/Fonts/#iconfont"
|
||||
FontSize="22"
|
||||
Text="" />
|
||||
<TextBlock
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
FontSize="20"
|
||||
Text="报文发送方式:"
|
||||
TextAlignment="Center" />
|
||||
<ComboBox
|
||||
Width="120"
|
||||
DisplayMemberPath="Text"
|
||||
FontSize="20"
|
||||
ItemsSource="{Binding SendOrderCbxItems}"
|
||||
SelectedValue="{Binding CurSendOrder, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
SelectedValuePath="Key" />
|
||||
|
||||
</StackPanel>
|
||||
|
||||
<Grid Grid.Row="1">
|
||||
<DataGrid
|
||||
x:Name="MainDatagrid"
|
||||
Margin="5"
|
||||
AutoGenerateColumns="False"
|
||||
CanUserAddRows="False"
|
||||
HeadersVisibility="Column"
|
||||
ItemsSource="{Binding ListCANScheduleConfigDto}"
|
||||
SelectionMode="Extended"
|
||||
SelectionUnit="FullRow">
|
||||
<DataGrid.Columns>
|
||||
<!--<DataGridTextColumn
|
||||
Binding="{Binding Index}"
|
||||
Header="序号"
|
||||
IsReadOnly="True" />-->
|
||||
|
||||
<DataGridTextColumn
|
||||
Width="260"
|
||||
Binding="{Binding MsgName}"
|
||||
Header="消息名"
|
||||
IsReadOnly="True" />
|
||||
|
||||
<DataGridTextColumn
|
||||
Width="100"
|
||||
Binding="{Binding Cycle}"
|
||||
Header="周期" />
|
||||
|
||||
<!--<DataGridTemplateColumn Width="200" Header="发送方式">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<ComboBox
|
||||
DisplayMemberPath="Text"
|
||||
ItemsSource="{Binding Source={StaticResource Proxy}, Path=Data.SendOrderCbxItems}"
|
||||
SelectedValue="{Binding OrderSend, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
SelectedValuePath="Key" />
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>-->
|
||||
|
||||
<DataGridTemplateColumn Width="160" Header="调度器序号">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<ComboBox
|
||||
DisplayMemberPath="Text"
|
||||
ItemsSource="{Binding Source={StaticResource Proxy}, Path=Data.SchTabIndexCbxItems}"
|
||||
SelectedValue="{Binding SchTabIndex, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
SelectedValuePath="Key" />
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<!--<DataGridCheckBoxColumn Binding="{Binding IsEnable}" Header="是否启用" />-->
|
||||
</DataGrid.Columns>
|
||||
|
||||
<i:Interaction.Triggers>
|
||||
<i:EventTrigger EventName="SelectionChanged">
|
||||
<prism:InvokeCommandAction Command="{Binding GridSelectionChangedCmd}" CommandParameter="{Binding ElementName=MainDatagrid, Path=SelectedItem}" />
|
||||
</i:EventTrigger>
|
||||
</i:Interaction.Triggers>
|
||||
</DataGrid>
|
||||
</Grid>
|
||||
|
||||
<StackPanel
|
||||
Grid.Row="2"
|
||||
HorizontalAlignment="Right"
|
||||
Orientation="Horizontal">
|
||||
<Button
|
||||
Margin="10,10"
|
||||
Command="{Binding SaveCmd}"
|
||||
Content="确定"
|
||||
Foreground="White" />
|
||||
<Button
|
||||
Margin="10,0"
|
||||
Command="{Binding CancelCmd}"
|
||||
Content="取消"
|
||||
Foreground="White" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
28
CapMachine.Wpf/Views/DialogZlgCANSchConfigView.xaml.cs
Normal file
28
CapMachine.Wpf/Views/DialogZlgCANSchConfigView.xaml.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace CapMachine.Wpf.Views
|
||||
{
|
||||
/// <summary>
|
||||
/// DialogZlgCANSchConfigView.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class DialogZlgCANSchConfigView : UserControl
|
||||
{
|
||||
public DialogZlgCANSchConfigView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -54,6 +54,43 @@
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<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="80" />
|
||||
</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>
|
||||
|
||||
<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="定时调度表:" />
|
||||
<Button
|
||||
Margin="10,0"
|
||||
Command="{Binding AddCycleTimeSch}"
|
||||
Content="加入定时调度表"
|
||||
Foreground="White"
|
||||
IsEnabled="{Binding CanAddCycleTimeSch}" />
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel
|
||||
Grid.Row="0"
|
||||
@@ -261,6 +298,11 @@
|
||||
Grid.Row="2"
|
||||
Margin="5"
|
||||
ItemsSource="{Binding SignalTree}">
|
||||
<TreeView.ItemContainerStyle>
|
||||
<Style TargetType="TreeViewItem">
|
||||
<Setter Property="IsExpanded" Value="True" />
|
||||
</Style>
|
||||
</TreeView.ItemContainerStyle>
|
||||
<TreeView.Resources>
|
||||
<HierarchicalDataTemplate DataType="{x:Type vm:DialogZlgCanLinRwConfigViewModel+SignalFrameNode}" ItemsSource="{Binding Signals}">
|
||||
<TextBlock FontWeight="Bold" Text="{Binding FrameName}" />
|
||||
|
||||
@@ -17,6 +17,29 @@
|
||||
<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 />
|
||||
@@ -26,7 +49,8 @@
|
||||
Margin="3"
|
||||
Background="{DynamicResource MaterialDesignLightBackground}"
|
||||
Foreground="{DynamicResource PrimaryHueLightForegroundBrush}"
|
||||
UniformCornerRadius="5">
|
||||
UniformCornerRadius="5"
|
||||
Grid.ColumnSpan="2">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
|
||||
<TextBlock
|
||||
@@ -98,7 +122,7 @@
|
||||
</StackPanel>
|
||||
</materialDesign:Card>
|
||||
|
||||
<Grid Grid.Row="1">
|
||||
<Grid Grid.Row="1" Grid.Column="0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="400" />
|
||||
<ColumnDefinition />
|
||||
@@ -112,6 +136,7 @@
|
||||
UniformCornerRadius="5">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="40" />
|
||||
<RowDefinition Height="40" />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
@@ -123,12 +148,93 @@
|
||||
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="1"
|
||||
Grid.Row="2"
|
||||
AutoGenerateColumns="False"
|
||||
CanUserAddRows="False"
|
||||
HeadersVisibility="Column"
|
||||
IsEnabled="{Binding IsLINConfigDatagridActive}"
|
||||
ItemsSource="{Binding ListCanLinConfigPro}"
|
||||
SelectedItem="{Binding SelectCanLinConfigPro, Mode=TwoWay}">
|
||||
<i:Interaction.Triggers>
|
||||
@@ -155,7 +261,12 @@
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="40" />
|
||||
<RowDefinition Height="80" />
|
||||
<RowDefinition Height="60" />
|
||||
<RowDefinition Height="40" />
|
||||
<RowDefinition Height="200" />
|
||||
<RowDefinition Height="40" />
|
||||
<RowDefinition Height="220" />
|
||||
<RowDefinition Height="40" />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
@@ -164,46 +275,467 @@
|
||||
VerticalAlignment="Center"
|
||||
FontSize="18"
|
||||
FontWeight="Bold"
|
||||
Text="参数" />
|
||||
Text="参数操作" />
|
||||
|
||||
<StackPanel Grid.Row="1" Margin="10" Orientation="Horizontal">
|
||||
<TextBlock VerticalAlignment="Center" FontSize="16" Text="波特率:" />
|
||||
<TextBox
|
||||
Width="120"
|
||||
Margin="5,0,20,0"
|
||||
VerticalContentAlignment="Center"
|
||||
Text="{Binding LinBaudRate, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
|
||||
<StackPanel
|
||||
Grid.Row="1"
|
||||
Margin="0,0,15,0"
|
||||
HorizontalAlignment="Right"
|
||||
Orientation="Horizontal">
|
||||
|
||||
<Button
|
||||
Margin="0,0,20,0"
|
||||
Command="{Binding OpenRwDialogCmd}"
|
||||
Foreground="White"
|
||||
IsEnabled="{Binding IsRwEditable}">
|
||||
<TextBlock FontSize="14" Text="读写设置" />
|
||||
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>
|
||||
|
||||
<CheckBox
|
||||
VerticalAlignment="Center"
|
||||
Content="调度使能"
|
||||
IsChecked="{Binding CurrentSchEnable, Mode=TwoWay}">
|
||||
<i:Interaction.Triggers>
|
||||
<i:EventTrigger EventName="Click">
|
||||
<prism:InvokeCommandAction
|
||||
Command="{Binding SchEnableCmd}"
|
||||
CommandParameter="{Binding IsChecked, RelativeSource={RelativeSource AncestorType=CheckBox}}" />
|
||||
</i:EventTrigger>
|
||||
</i:Interaction.Triggers>
|
||||
</CheckBox>
|
||||
</StackPanel>
|
||||
|
||||
<TextBlock
|
||||
Grid.Row="2"
|
||||
Margin="10"
|
||||
FontSize="16"
|
||||
TextWrapping="Wrap"
|
||||
Text="提示:当前 ZLG LIN 仅提供硬件 LIN 收发能力;LDF 解析需要后续接入 ZLG 的 LDF DLL(不会返回模拟数据)。" />
|
||||
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>
|
||||
|
||||
Reference in New Issue
Block a user