添加项目文件。
This commit is contained in:
@@ -0,0 +1,90 @@
|
||||
<local:BaseWindow
|
||||
x:Class="SamplePre.UIWpf.SampleManager.chirld.ActionShowWindow"
|
||||
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:local="clr-namespace:SamplePre.UIWpf.BaseWindows"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
Title="命令下发"
|
||||
Width="400"
|
||||
Height="500"
|
||||
ResizeMode="NoResize"
|
||||
WindowStartupLocation="CenterScreen"
|
||||
mc:Ignorable="d">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="40" />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Button
|
||||
Width="100"
|
||||
Height="30"
|
||||
Margin="10,0"
|
||||
Command="{Binding CmdDoClickCommand}"
|
||||
Content="下发命令" />
|
||||
<Button
|
||||
Width="100"
|
||||
Height="30"
|
||||
Margin="10,0"
|
||||
Command="{Binding InitPlcStateCommand}"
|
||||
Content="复位" />
|
||||
</StackPanel>
|
||||
|
||||
<!-- 指令列表 -->
|
||||
<DataGrid
|
||||
x:Name="dg_cmds"
|
||||
Grid.Row="1"
|
||||
AutoGenerateColumns="False"
|
||||
Background="White"
|
||||
CanUserAddRows="False"
|
||||
CanUserSortColumns="True"
|
||||
FrozenColumnCount="1"
|
||||
HeadersVisibility="None"
|
||||
HorizontalScrollBarVisibility="Auto"
|
||||
ItemsSource="{Binding ActionParmList}"
|
||||
SelectionMode="Extended"
|
||||
VerticalScrollBarVisibility="Auto">
|
||||
<!-- 分组样式 -->
|
||||
<DataGrid.GroupStyle>
|
||||
<GroupStyle>
|
||||
<GroupStyle.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<DockPanel
|
||||
Height="25"
|
||||
Background="#EEEEEE"
|
||||
LastChildFill="True">
|
||||
<TextBlock
|
||||
Margin="10,0"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
FontWeight="Bold"
|
||||
Text="{Binding Name}" />
|
||||
</DockPanel>
|
||||
</DataTemplate>
|
||||
</GroupStyle.HeaderTemplate>
|
||||
</GroupStyle>
|
||||
</DataGrid.GroupStyle>
|
||||
|
||||
<DataGrid.Columns>
|
||||
<!--<DataGridTextColumn Header="动作" Binding="{Binding action_name}" Width="*"/>-->
|
||||
<DataGridTextColumn
|
||||
Width="*"
|
||||
Binding="{Binding title}"
|
||||
Header="参数名称"
|
||||
IsReadOnly="True" />
|
||||
<DataGridTextColumn
|
||||
Width="*"
|
||||
Binding="{Binding data_value}"
|
||||
Header="值"
|
||||
IsReadOnly="False" />
|
||||
<DataGridTextColumn
|
||||
Width="*"
|
||||
Binding="{Binding unit}"
|
||||
Header="单位"
|
||||
IsReadOnly="True" />
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
|
||||
</Grid>
|
||||
</local:BaseWindow>
|
||||
Reference in New Issue
Block a user