添加项目文件。
This commit is contained in:
211
SamplePreSystem.UI/Views/ConfigManager/SysConfigMangerView.xaml
Normal file
211
SamplePreSystem.UI/Views/ConfigManager/SysConfigMangerView.xaml
Normal file
@@ -0,0 +1,211 @@
|
||||
<UserControl
|
||||
x:Class="SamplePreSystem.UI.ConfigManager.SysConfigMangerView"
|
||||
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:SamplePreSystem.UI.ConfigManager"
|
||||
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
d:DesignHeight="450"
|
||||
d:DesignWidth="800"
|
||||
Background="#E6E6E6"
|
||||
mc:Ignorable="d">
|
||||
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="250" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
|
||||
<!-- 配置列表 -->
|
||||
<Border
|
||||
Grid.Column="0"
|
||||
Margin="5"
|
||||
Background="White"
|
||||
CornerRadius="5">
|
||||
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="35" />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid Grid.Row="0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80" />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock
|
||||
Margin="5,0,0,0"
|
||||
VerticalAlignment="Center"
|
||||
FontSize="14"
|
||||
Text="配置列表:" />
|
||||
|
||||
<StackPanel
|
||||
Grid.Column="1"
|
||||
Margin="5,0"
|
||||
HorizontalAlignment="Right"
|
||||
Orientation="Horizontal">
|
||||
|
||||
<Button
|
||||
x:Name="btnAdd"
|
||||
Width="50"
|
||||
Height="25"
|
||||
Margin="5,0"
|
||||
Command="{Binding AddClassClickCommand}"
|
||||
Content="{materialDesign:PackIcon PlusCircleOutline}"
|
||||
Style="{StaticResource MaterialDesignRaisedSecondaryButton}"
|
||||
ToolTip="新增" />
|
||||
<Button
|
||||
x:Name="btnDel"
|
||||
Width="50"
|
||||
Height="25"
|
||||
Margin="5,0"
|
||||
Command="{Binding DelClassClickCommand}"
|
||||
Content="{materialDesign:PackIcon DeleteCircleOutline}"
|
||||
Style="{StaticResource MaterialDesignRaisedSecondaryButton}"
|
||||
ToolTip="删除" />
|
||||
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
|
||||
<!-- 配置列表 -->
|
||||
<TreeView
|
||||
x:Name="tvData"
|
||||
Grid.Row="1"
|
||||
FontSize="13"
|
||||
ItemsSource="{Binding DictClassList}">
|
||||
<i:Interaction.Triggers>
|
||||
<i:EventTrigger EventName="SelectedItemChanged">
|
||||
<i:InvokeCommandAction Command="{Binding TvDataSelectedItemChangedCommand}" PassEventArgsToCommand="True" />
|
||||
</i:EventTrigger>
|
||||
</i:Interaction.Triggers>
|
||||
<!-- 全局样式:所有节点默认展开 -->
|
||||
<TreeView.ItemContainerStyle>
|
||||
<Style BasedOn="{StaticResource MaterialDesignTreeViewItem}" TargetType="TreeViewItem">
|
||||
<Setter Property="IsExpanded" Value="True" />
|
||||
</Style>
|
||||
</TreeView.ItemContainerStyle>
|
||||
|
||||
<TreeView.ItemTemplate>
|
||||
<HierarchicalDataTemplate ItemsSource="{Binding Children}">
|
||||
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<materialDesign:PackIcon Margin="5,0" Kind="{Binding IconKind}" />
|
||||
<!-- 复选框 + 文字 -->
|
||||
<TextBlock Text="{Binding Name}" />
|
||||
</StackPanel>
|
||||
|
||||
|
||||
</HierarchicalDataTemplate>
|
||||
</TreeView.ItemTemplate>
|
||||
</TreeView>
|
||||
</Grid>
|
||||
|
||||
|
||||
|
||||
</Border>
|
||||
|
||||
|
||||
<Border
|
||||
Grid.Column="1"
|
||||
Margin="0,5,5,5"
|
||||
Background="White"
|
||||
CornerRadius="5">
|
||||
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="35" />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid Grid.Row="0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80" />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock
|
||||
Margin="5,0,0,0"
|
||||
VerticalAlignment="Center"
|
||||
FontSize="14"
|
||||
Text="配置内容:" />
|
||||
|
||||
<StackPanel
|
||||
Grid.Column="1"
|
||||
Margin="5,0"
|
||||
HorizontalAlignment="Right"
|
||||
Orientation="Horizontal">
|
||||
|
||||
<Button
|
||||
x:Name="btnAddItem"
|
||||
Width="50"
|
||||
Height="25"
|
||||
Margin="5,0"
|
||||
Command="{Binding AddItemClickCommand}"
|
||||
Content="{materialDesign:PackIcon PlusCircleOutline}"
|
||||
Style="{StaticResource MaterialDesignRaisedSecondaryButton}"
|
||||
ToolTip="新增" />
|
||||
<Button
|
||||
x:Name="btnDelItem"
|
||||
Width="50"
|
||||
Height="25"
|
||||
Margin="5,0"
|
||||
Command="{Binding DelItemClickCommand}"
|
||||
Content="{materialDesign:PackIcon DeleteCircleOutline}"
|
||||
Style="{StaticResource MaterialDesignRaisedSecondaryButton}"
|
||||
ToolTip="删除" />
|
||||
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
|
||||
|
||||
<DataGrid
|
||||
x:Name="dg_list"
|
||||
Grid.Row="1"
|
||||
Margin="5"
|
||||
AutoGenerateColumns="False"
|
||||
Background="White"
|
||||
CanUserAddRows="False"
|
||||
CanUserSortColumns="True"
|
||||
FrozenColumnCount="1"
|
||||
HorizontalScrollBarVisibility="Auto"
|
||||
ItemsSource="{Binding SysDicts}"
|
||||
SelectedItem="{Binding SysDict}"
|
||||
SelectionMode="Extended"
|
||||
VerticalScrollBarVisibility="Auto">
|
||||
|
||||
<DataGrid.Columns>
|
||||
<!--<DataGridTextColumn Header="动作" Binding="{Binding action_name}" Width="*"/>-->
|
||||
<DataGridTextColumn
|
||||
Width="*"
|
||||
Binding="{Binding id}"
|
||||
Header="ID"
|
||||
IsReadOnly="True" />
|
||||
<DataGridTextColumn
|
||||
Width="*"
|
||||
Binding="{Binding data_type}"
|
||||
Header="项目名称"
|
||||
IsReadOnly="True" />
|
||||
<DataGridTextColumn
|
||||
Width="*"
|
||||
Binding="{Binding data_value}"
|
||||
Header="值"
|
||||
IsReadOnly="True" />
|
||||
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
|
||||
|
||||
|
||||
</Grid>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</Border>
|
||||
|
||||
</Grid>
|
||||
|
||||
</UserControl>
|
||||
Reference in New Issue
Block a user