LIN 调度表功能同步 25002
This commit is contained in:
210
CapMachine.Wpf/Views/DialogLINSchConfigView.xaml
Normal file
210
CapMachine.Wpf/Views/DialogLINSchConfigView.xaml
Normal file
@@ -0,0 +1,210 @@
|
||||
<UserControl
|
||||
x:Class="CapMachine.Wpf.Views.DialogLINSchConfigView"
|
||||
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/"
|
||||
xmlns:vm="clr-namespace:CapMachine.Wpf.ViewModels"
|
||||
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="Add"
|
||||
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 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">
|
||||
<Button
|
||||
Margin="10,0"
|
||||
Command="{Binding OpCmd}"
|
||||
CommandParameter="LoadSch"
|
||||
FontWeight="Bold"
|
||||
Foreground="Green"
|
||||
Style="{StaticResource MaterialDesignFlatAccentBgButton}">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock
|
||||
Margin="0,0,5,0"
|
||||
VerticalAlignment="Center"
|
||||
FontFamily="/Assets/Fonts/#iconfont"
|
||||
FontSize="14"
|
||||
Foreground="Green"
|
||||
Text="" />
|
||||
<TextBlock
|
||||
VerticalAlignment="Center"
|
||||
FontSize="14"
|
||||
Text="下载" />
|
||||
</StackPanel>
|
||||
</Button>
|
||||
|
||||
<!--<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">
|
||||
<Border
|
||||
Margin="5"
|
||||
Padding="6"
|
||||
BorderBrush="#D0D0D0"
|
||||
BorderThickness="1"
|
||||
CornerRadius="4">
|
||||
<TreeView ItemsSource="{Binding SchTabTree}">
|
||||
<TreeView.ItemTemplate>
|
||||
<!-- 父节点模板:不使用 DataType,避免类型解析 -->
|
||||
<HierarchicalDataTemplate ItemsSource="{Binding Children}">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<CheckBox IsChecked="{Binding IsSelected, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
|
||||
<TextBlock Text=" " />
|
||||
<TextBlock
|
||||
FontSize="20"
|
||||
FontWeight="Bold"
|
||||
Text="{Binding SchTabName}" />
|
||||
</StackPanel>
|
||||
<!-- 子节点模板:文本显示 -->
|
||||
<HierarchicalDataTemplate.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel VerticalAlignment="Center" Orientation="Horizontal">
|
||||
<CheckBox
|
||||
Margin="0,0,6,0"
|
||||
VerticalAlignment="Center"
|
||||
IsChecked="{Binding IsSelected, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
IsEnabled="{Binding CanEdit}" />
|
||||
<TextBlock
|
||||
VerticalAlignment="Center"
|
||||
FontSize="16"
|
||||
Foreground="DimGray">
|
||||
<Run Text="{Binding MsgName}" />
|
||||
<Run Text=" (Index: " />
|
||||
<Run Text="{Binding MsgNameIndex}" />
|
||||
<Run Text=")" />
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</HierarchicalDataTemplate.ItemTemplate>
|
||||
</HierarchicalDataTemplate>
|
||||
</TreeView.ItemTemplate>
|
||||
</TreeView>
|
||||
</Border>
|
||||
</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>
|
||||
Reference in New Issue
Block a user