周立功开发过程1
This commit is contained in:
@@ -655,7 +655,6 @@
|
||||
Width="40"
|
||||
Margin="5,2"
|
||||
Command="{Binding SchEnableCmd}"
|
||||
CommandParameter="{Binding SelectedCANConfigExdDto.SchEnable}"
|
||||
IsChecked="{Binding SelectedCANConfigExdDto.SchEnable}"
|
||||
Style="{StaticResource MaterialDesignSwitchToggleButton}"
|
||||
ToolTip="启用调度表" />
|
||||
|
||||
@@ -710,13 +710,15 @@
|
||||
Width="40"
|
||||
Margin="2,2"
|
||||
Command="{Binding SchEnableCmd}"
|
||||
CommandParameter="{Binding SelectedCANConfigExdDto.SchEnable}"
|
||||
IsChecked="{Binding SelectedCANConfigExdDto.SchEnable}"
|
||||
Style="{StaticResource MaterialDesignSwitchToggleButton}"
|
||||
ToolTip="启用调度表" />
|
||||
|
||||
</StackPanel>
|
||||
|
||||
<!--<StackPanel Grid.Row="1" Grid.Column="2">
|
||||
<Button Command="{Binding btnTestPLC}" />
|
||||
</StackPanel>-->
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
@@ -14,12 +14,14 @@
|
||||
Width="1920"
|
||||
Height="1080"
|
||||
prism:ViewModelLocator.AutoWireViewModel="True"
|
||||
Closed="Window_Closed"
|
||||
Closing="Window_Closing"
|
||||
Icon="/Assets/Images/favicon.ico"
|
||||
StateChanged="Window_StateChanged"
|
||||
WindowStartupLocation="CenterScreen"
|
||||
WindowState="Maximized"
|
||||
WindowStyle="SingleBorderWindow"
|
||||
mc:Ignorable="d" Closing="Window_Closing" Closed="Window_Closed">
|
||||
mc:Ignorable="d">
|
||||
<Window.Resources>
|
||||
<localEx:BindingProxy x:Key="Proxy" Data="{Binding}" />
|
||||
</Window.Resources>
|
||||
|
||||
375
CapMachine.Wpf/Views/ZlgCanDriveConfigView.xaml
Normal file
375
CapMachine.Wpf/Views/ZlgCanDriveConfigView.xaml
Normal file
@@ -0,0 +1,375 @@
|
||||
<UserControl
|
||||
x:Class="CapMachine.Wpf.Views.ZlgCanDriveConfigView"
|
||||
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.RowDefinitions>
|
||||
<RowDefinition Height="60" />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<materialDesign:Card
|
||||
Margin="3"
|
||||
Background="{DynamicResource MaterialDesignLightBackground}"
|
||||
Foreground="{DynamicResource PrimaryHueLightForegroundBrush}"
|
||||
UniformCornerRadius="5">
|
||||
<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="{Binding DbcPathTitle}" />
|
||||
|
||||
<Border
|
||||
Width="700"
|
||||
Margin="5,8"
|
||||
Padding="15,5"
|
||||
Background="LightGray"
|
||||
CornerRadius="5">
|
||||
<TextBlock
|
||||
VerticalAlignment="Center"
|
||||
FontSize="22"
|
||||
Text="{Binding CurrentDbcPath}" />
|
||||
</Border>
|
||||
|
||||
<Button Command="{Binding LoadDbcCmd}" Foreground="White">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock
|
||||
Margin="2,0"
|
||||
VerticalAlignment="Center"
|
||||
FontFamily="/Assets/Fonts/#iconfont"
|
||||
FontSize="18"
|
||||
Text=" " />
|
||||
<TextBlock VerticalAlignment="Center" FontSize="14" Text="选择Dbc文件" />
|
||||
</StackPanel>
|
||||
</Button>
|
||||
|
||||
<Button
|
||||
Margin="5,0"
|
||||
Command="{Binding CanOpCmd}"
|
||||
CommandParameter="CycleRecive">
|
||||
<Button.Style>
|
||||
<Style BasedOn="{StaticResource MaterialDesignFlatDarkBgButton}" TargetType="Button">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding ZlgCanDriveService.IsCycleRevice}" Value="true">
|
||||
<Setter Property="Background" Value="LimeGreen" />
|
||||
<Setter Property="Foreground" Value="White" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding ZlgCanDriveService.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>
|
||||
|
||||
<TextBlock Margin="10,0,5,0" VerticalAlignment="Center" FontSize="14" Text="报文状态:" />
|
||||
|
||||
<Border Margin="0,10,5,10" Padding="5" CornerRadius="3">
|
||||
<Border.Style>
|
||||
<Style TargetType="Border">
|
||||
<Setter Property="Background" Value="Gray" />
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding ZlgCanDriveService.IsSendOk}" Value="true">
|
||||
<Setter Property="Background" Value="LimeGreen" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Border.Style>
|
||||
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="White" Text="发送" />
|
||||
</Border>
|
||||
|
||||
<Border Margin="0,10,5,10" Padding="5" CornerRadius="3">
|
||||
<Border.Style>
|
||||
<Style TargetType="Border">
|
||||
<Setter Property="Background" Value="Gray" />
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding ZlgCanDriveService.IsReviceOk}" Value="true">
|
||||
<Setter Property="Background" Value="LimeGreen" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Border.Style>
|
||||
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="White" Text="接收" />
|
||||
</Border>
|
||||
|
||||
<TextBlock Margin="25,0,5,0" VerticalAlignment="Center" FontSize="18" Text="模式:" />
|
||||
<ComboBox
|
||||
Width="120"
|
||||
Margin="0,0,15,0"
|
||||
VerticalAlignment="Center"
|
||||
SelectedValue="{Binding SelectedModeKey}"
|
||||
SelectedValuePath="Tag">
|
||||
<ComboBoxItem Content="CAN" Tag="Can" />
|
||||
<ComboBoxItem Content="CANFD" Tag="CanFd" />
|
||||
</ComboBox>
|
||||
|
||||
<Button
|
||||
Margin="2,0"
|
||||
Command="{Binding CanOpCmd}"
|
||||
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="2,0"
|
||||
Command="{Binding CanOpCmd}"
|
||||
CommandParameter="Close"
|
||||
Foreground="White">
|
||||
<TextBlock FontSize="14" Text="关闭" />
|
||||
</Button>
|
||||
<Button
|
||||
Margin="2,0"
|
||||
Command="{Binding CanOpCmd}"
|
||||
CommandParameter="Parse"
|
||||
Foreground="White">
|
||||
<TextBlock FontSize="14" Text="解析" />
|
||||
</Button>
|
||||
<Button
|
||||
Margin="2,0"
|
||||
Command="{Binding CanOpCmd}"
|
||||
CommandParameter="Save"
|
||||
Foreground="White">
|
||||
<TextBlock FontSize="14" Text="保存" />
|
||||
</Button>
|
||||
|
||||
<TextBlock
|
||||
Margin="15,0,5,0"
|
||||
VerticalAlignment="Center"
|
||||
FontFamily="/Assets/Fonts/#iconfont"
|
||||
FontSize="18"
|
||||
Text="" />
|
||||
|
||||
<TextBlock Margin="0,0,5,0" VerticalAlignment="Center" FontSize="14" Text="连接" />
|
||||
<Border
|
||||
Width="50"
|
||||
Margin="0,10,5,10"
|
||||
Padding="5"
|
||||
CornerRadius="3">
|
||||
<Border.Style>
|
||||
<Style TargetType="Border">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding ZlgCanDriveService.OpenState}" Value="True">
|
||||
<Setter Property="Background" Value="LimeGreen" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding ZlgCanDriveService.OpenState}" Value="False">
|
||||
<Setter Property="Background" Value="Gray" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Border.Style>
|
||||
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="White" Text="连接" />
|
||||
</Border>
|
||||
|
||||
<Border
|
||||
Width="60"
|
||||
Margin="0,10,5,10"
|
||||
Padding="5"
|
||||
CornerRadius="3">
|
||||
<Border.Style>
|
||||
<Style TargetType="Border">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding ZlgCanDriveService.DbcParserState}" Value="True">
|
||||
<Setter Property="Background" Value="LimeGreen" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding ZlgCanDriveService.DbcParserState}" Value="False">
|
||||
<Setter Property="Background" Value="Gray" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Border.Style>
|
||||
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="White" Text="Dbc解析" />
|
||||
</Border>
|
||||
|
||||
<Button
|
||||
Margin="10,0,5,0"
|
||||
Command="{Binding CanOpCmd}"
|
||||
CommandParameter="CycleSend">
|
||||
<Button.Style>
|
||||
<Style BasedOn="{StaticResource MaterialDesignFlatDarkBgButton}" TargetType="Button">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding ZlgCanDriveService.IsCycleSend}" Value="true">
|
||||
<Setter Property="Background" Value="LimeGreen" />
|
||||
<Setter Property="Foreground" Value="White" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding ZlgCanDriveService.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>
|
||||
|
||||
<TextBlock
|
||||
Margin="10,0,0,0"
|
||||
VerticalAlignment="Center"
|
||||
FontSize="12"
|
||||
Text="{Binding OpTip}" />
|
||||
<TextBlock
|
||||
Margin="10,0,0,0"
|
||||
VerticalAlignment="Center"
|
||||
FontSize="12"
|
||||
Foreground="Red"
|
||||
Text="{Binding LastError}" />
|
||||
</StackPanel>
|
||||
</materialDesign:Card>
|
||||
|
||||
<Grid Grid.Row="1">
|
||||
<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 />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock
|
||||
Margin="10,0"
|
||||
VerticalAlignment="Center"
|
||||
FontSize="18"
|
||||
FontWeight="Bold"
|
||||
Text="配置程序" />
|
||||
|
||||
<DataGrid
|
||||
x:Name="CanConfigDatagrid"
|
||||
Grid.Row="1"
|
||||
AutoGenerateColumns="False"
|
||||
CanUserAddRows="False"
|
||||
HeadersVisibility="Column"
|
||||
ItemsSource="{Binding ListCanLinConfigPro}"
|
||||
SelectedItem="{Binding SelectCanLinConfigPro, Mode=TwoWay}">
|
||||
<i:Interaction.Triggers>
|
||||
<i:EventTrigger EventName="SelectionChanged">
|
||||
<prism:InvokeCommandAction
|
||||
Command="{Binding CanConfigProGridSelectionChangedCmd}"
|
||||
CommandParameter="{Binding ElementName=CanConfigDatagrid, 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="80" />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock
|
||||
Margin="10,0"
|
||||
VerticalAlignment="Center"
|
||||
FontSize="18"
|
||||
FontWeight="Bold"
|
||||
Text="参数/信号" />
|
||||
|
||||
<StackPanel Grid.Row="1" Margin="10" Orientation="Horizontal">
|
||||
<TextBlock VerticalAlignment="Center" FontSize="16" Text="周期:" />
|
||||
<TextBox
|
||||
Width="100"
|
||||
Margin="5,0,20,0"
|
||||
VerticalContentAlignment="Center"
|
||||
Text="{Binding CurrentCycle, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
|
||||
|
||||
<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>
|
||||
|
||||
<DataGrid
|
||||
Grid.Row="2"
|
||||
AutoGenerateColumns="False"
|
||||
CanUserAddRows="False"
|
||||
HeadersVisibility="Column"
|
||||
ItemsSource="{Binding ListCanDbcModel}"
|
||||
SelectedItem="{Binding SelectedCanDbcModel, Mode=TwoWay}">
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn Binding="{Binding MsgName}" Header="Msg" Width="200" />
|
||||
<DataGridTextColumn Binding="{Binding SignalName}" Header="Signal" Width="*" />
|
||||
<DataGridTextColumn Binding="{Binding SignalRtValue}" Header="Value" Width="150" />
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
</Grid>
|
||||
</materialDesign:Card>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
28
CapMachine.Wpf/Views/ZlgCanDriveConfigView.xaml.cs
Normal file
28
CapMachine.Wpf/Views/ZlgCanDriveConfigView.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>
|
||||
/// ZlgCanDriveConfigView.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class ZlgCanDriveConfigView : UserControl
|
||||
{
|
||||
public ZlgCanDriveConfigView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
201
CapMachine.Wpf/Views/ZlgLinDriveConfigView.xaml
Normal file
201
CapMachine.Wpf/Views/ZlgLinDriveConfigView.xaml
Normal file
@@ -0,0 +1,201 @@
|
||||
<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.RowDefinitions>
|
||||
<RowDefinition Height="60" />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<materialDesign:Card
|
||||
Margin="3"
|
||||
Background="{DynamicResource MaterialDesignLightBackground}"
|
||||
Foreground="{DynamicResource PrimaryHueLightForegroundBrush}"
|
||||
UniformCornerRadius="5">
|
||||
<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.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 />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock
|
||||
Margin="10,0"
|
||||
VerticalAlignment="Center"
|
||||
FontSize="18"
|
||||
FontWeight="Bold"
|
||||
Text="配置程序" />
|
||||
|
||||
<DataGrid
|
||||
x:Name="LinConfigDatagrid"
|
||||
Grid.Row="1"
|
||||
AutoGenerateColumns="False"
|
||||
CanUserAddRows="False"
|
||||
HeadersVisibility="Column"
|
||||
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="80" />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock
|
||||
Margin="10,0"
|
||||
VerticalAlignment="Center"
|
||||
FontSize="18"
|
||||
FontWeight="Bold"
|
||||
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}" />
|
||||
|
||||
<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(不会返回模拟数据)。" />
|
||||
</Grid>
|
||||
</materialDesign:Card>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
28
CapMachine.Wpf/Views/ZlgLinDriveConfigView.xaml.cs
Normal file
28
CapMachine.Wpf/Views/ZlgLinDriveConfigView.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>
|
||||
/// ZlgLinDriveConfigView.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class ZlgLinDriveConfigView : UserControl
|
||||
{
|
||||
public ZlgLinDriveConfigView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user