添加项目文件。

This commit is contained in:
2026-04-30 11:34:41 +08:00
parent a8539ccaac
commit 80635aa46e
181 changed files with 16378 additions and 0 deletions

View File

@@ -0,0 +1,146 @@
<basewindows:BaseWindow
x:Class="SamplePre.UIWpf.ConfigManager.chirld.NewUserWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:basewindows="clr-namespace:SamplePre.UIWpf.BaseWindows"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Title="用户编辑"
Width="400"
Height="300"
ResizeMode="NoResize"
WindowStartupLocation="CenterScreen"
mc:Ignorable="d">
<Grid Margin="10">
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="50" />
</Grid.RowDefinitions>
<Grid>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="100" />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<TextBlock
Grid.Row="0"
VerticalAlignment="Center"
Text="用户名称:" />
<TextBox
Grid.Row="0"
Grid.Column="1"
Width="250"
Height="30"
HorizontalAlignment="Left"
Text="{Binding ConfigUser.username}" />
<TextBlock
Grid.Row="1"
VerticalAlignment="Center"
Text="密码:" />
<TextBox
Grid.Row="1"
Grid.Column="1"
Width="250"
Height="30"
HorizontalAlignment="Left"
Text="{Binding ConfigUser.password}" />
<TextBlock
Grid.Row="2"
VerticalAlignment="Center"
Text="角色:" />
<!-- 多选下拉框,选择后在上方显示选中内容 -->
<StackPanel
Grid.Row="2"
Grid.Column="1"
Width="250"
Height="30"
HorizontalAlignment="Left"
Orientation="Vertical">
<!-- 显示已选中的内容 -->
<TextBox
x:Name="txtSelectedRoles"
Width="250"
Height="30"
materialDesign:HintAssist.Hint="已选角色"
FontSize="13"
IsReadOnly="True" />
<!-- 多选下拉框 -->
<ComboBox
x:Name="cmbRole"
Width="250"
Height="30"
Margin="0,-30,0,0"
ItemsSource="{Binding Roles}">
<!-- 覆盖上去,视觉一体 -->
<ComboBox.ItemTemplate>
<DataTemplate>
<CheckBox
x:Name="ckbRole"
Margin="4,2"
Click="ckbRole_Click"
Content="{Binding name}"
IsChecked="{Binding IsSelected, Mode=TwoWay}" />
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
</StackPanel>
<TextBlock
Grid.Row="3"
VerticalAlignment="Center"
Text="是否启用:" />
<ComboBox
x:Name="cmbParamType"
Grid.Row="3"
Grid.Column="1"
Width="250"
Height="30"
HorizontalAlignment="Left"
Text="{Binding IsEnable}">
<ComboBoxItem Content="启用" />
<ComboBoxItem Content="禁用" />
</ComboBox>
</Grid>
<StackPanel
Grid.Row="1"
Margin="0,10,0,0"
HorizontalAlignment="Center"
Orientation="Horizontal">
<Button
x:Name="btnOK"
Width="80"
Margin="5"
Command="{Binding BtnSaveUserClickCommand}"
Content="确定" />
<Button
x:Name="btnCancel"
Width="80"
Margin="5"
Click="btnCancel_Click"
Content="取消" />
</StackPanel>
</Grid>
</basewindows:BaseWindow>