周立功开发过程1
This commit is contained in:
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>
|
||||
Reference in New Issue
Block a user