添加项目文件。
This commit is contained in:
141
SamplePreSystem.UI/Views/SOPManager/ParamManagerView.xaml
Normal file
141
SamplePreSystem.UI/Views/SOPManager/ParamManagerView.xaml
Normal file
@@ -0,0 +1,141 @@
|
||||
<UserControl
|
||||
x:Class="SamplePre.UIWpf.ParamManager.ParamManagerView"
|
||||
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.ParamManager"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
d:DesignHeight="450"
|
||||
d:DesignWidth="800"
|
||||
Background="#e6e6e6"
|
||||
mc:Ignorable="d">
|
||||
|
||||
<Border
|
||||
Margin="5"
|
||||
Background="White"
|
||||
CornerRadius="5">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="50" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="auto" />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock
|
||||
Width="100"
|
||||
Margin="10,0"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
FontSize="13"
|
||||
Text="参数列表" />
|
||||
<StackPanel
|
||||
Grid.Column="1"
|
||||
Margin="5,0"
|
||||
HorizontalAlignment="Right"
|
||||
Orientation="Horizontal">
|
||||
|
||||
|
||||
<TextBlock
|
||||
Margin="15,0"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Text="参数类型:" />
|
||||
<ComboBox
|
||||
x:Name="cmbDataType"
|
||||
Width="100"
|
||||
Height="30"
|
||||
Margin="0,0,10,0"
|
||||
VerticalAlignment="Center"
|
||||
VerticalContentAlignment="Center"
|
||||
ItemsSource="{Binding DataTypes}"
|
||||
SelectedItem="{Binding FilterType}" />
|
||||
<Button
|
||||
x:Name="btnAddParam"
|
||||
Width="90"
|
||||
Height="30"
|
||||
Margin="3"
|
||||
Command="{Binding BtnAddParamClickCommand}"
|
||||
Content="新增"
|
||||
Style="{StaticResource IconTextButtonStyle}"
|
||||
Tag="PackageVariantClosedPlus" />
|
||||
<Button
|
||||
x:Name="btnEdit"
|
||||
Width="90"
|
||||
Height="30"
|
||||
Margin="3"
|
||||
Command="{Binding BtnEditClickCommand}"
|
||||
Content="编辑"
|
||||
Style="{StaticResource IconTextButtonStyle}"
|
||||
Tag="ContentSaveEditOutline" />
|
||||
<Button
|
||||
x:Name="btnDelParam"
|
||||
Width="80"
|
||||
Height="30"
|
||||
Margin="3"
|
||||
Command="{Binding BtnDelParamClickCommand}"
|
||||
Content="删除"
|
||||
Style="{StaticResource IconTextButtonStyle}"
|
||||
Tag="DeleteForeverOutline" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</StackPanel>
|
||||
|
||||
</Grid>
|
||||
|
||||
<!-- 参数列表 -->
|
||||
<DataGrid
|
||||
x:Name="dg_params"
|
||||
Grid.Row="1"
|
||||
Margin="5"
|
||||
AutoGenerateColumns="False"
|
||||
Background="White"
|
||||
CanUserAddRows="False"
|
||||
CanUserSortColumns="False"
|
||||
FrozenColumnCount="1"
|
||||
HorizontalScrollBarVisibility="Auto"
|
||||
IsReadOnly="True"
|
||||
ItemsSource="{Binding SysParams}"
|
||||
SelectedItem="{Binding SelectItem}"
|
||||
SelectionMode="Extended"
|
||||
VerticalScrollBarVisibility="Auto">
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn
|
||||
Width="*"
|
||||
Binding="{Binding title}"
|
||||
Header="参数名称" />
|
||||
<DataGridTextColumn
|
||||
Width="*"
|
||||
Binding="{Binding unit}"
|
||||
Header="单位" />
|
||||
<DataGridTextColumn
|
||||
Width="*"
|
||||
Binding="{Binding data_type}"
|
||||
Header="数据类型" />
|
||||
<DataGridTextColumn
|
||||
Width="*"
|
||||
Binding="{Binding data_value}"
|
||||
Header="值" />
|
||||
<DataGridTextColumn
|
||||
Width="*"
|
||||
Binding="{Binding plc_type}"
|
||||
Header="PLC映射" />
|
||||
<DataGridTextColumn
|
||||
Width="*"
|
||||
Binding="{Binding param_type}"
|
||||
Header="参数类型" />
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
|
||||
|
||||
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
</UserControl>
|
||||
Reference in New Issue
Block a user