181 lines
7.5 KiB
XML
181 lines
7.5 KiB
XML
<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>
|