BDU/ATS/Windows/UserSettingWindow.xaml

86 lines
4.2 KiB
XML

<mah:MetroWindow xmlns:mah="http://metro.mahapps.com/winfx/xaml/controls"
x:Class="BDU.Windows.UserSettingWindow"
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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:BDU.Windows"
d:DataContext="{d:DesignInstance Type=local:UserSettingWindow}"
mc:Ignorable="d"
ShowTitleBar="False"
WindowStartupLocation="CenterScreen"
ResizeMode="NoResize"
Height="281"
Width="417">
<Grid>
<GroupBox Header="用户编辑"
MouseLeftButtonDown="GroupBox_MouseLeftButtonDown"
Padding="10,15,10,0">
<Grid>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition Height="auto" />
</Grid.RowDefinitions>
<StackPanel VerticalAlignment="Center">
<StackPanel Margin="7"
Orientation="Horizontal">
<TextBlock VerticalAlignment="Bottom"
Width="60">用户名</TextBlock>
<TextBox Background="#fff"
Foreground="#000"
Width="120"
Text="{Binding UserInfo.UserName}"></TextBox>
</StackPanel>
<StackPanel Margin="7"
Orientation="Horizontal">
<TextBlock VerticalAlignment="Bottom"
Width="60">账户</TextBlock>
<TextBox Background="#fff"
Width="120"
Foreground="#000"
Text="{Binding UserInfo.UserAccount}"
IsReadOnly="{Binding IsEdit}" />
</StackPanel>
<StackPanel Margin="7"
Orientation="Horizontal">
<TextBlock VerticalAlignment="Bottom"
Width="60">密码</TextBlock>
<TextBox Background="#fff"
Width="120"
Foreground="#000"
Text="{Binding UserInfo.PassWord}"></TextBox>
</StackPanel>
<StackPanel Margin="7"
Orientation="Horizontal">
<TextBlock VerticalAlignment="Bottom"
Width="60">用户权限</TextBlock>
<ComboBox x:Name="roleComBox"
SelectedIndex="{Binding UserInfo.Role}"
Width="120">
<ComboBoxItem IsSelected="False"
Tag="0">用户</ComboBoxItem>
<ComboBoxItem IsSelected="False"
Tag="1">管理员</ComboBoxItem>
<ComboBoxItem IsSelected="False"
Tag="2">超级管理员</ComboBoxItem>
</ComboBox>
</StackPanel>
</StackPanel>
<StackPanel Grid.Row="1"
Orientation="Horizontal"
FlowDirection="RightToLeft"
Margin="5,20,5,15">
<Button Content="取消"
Width="70"
Click="Cancel_Click" />
<Button Content="保存"
Width="70"
Margin="20,0"
Click="Save_Click" />
</StackPanel>
</Grid>
</GroupBox>
</Grid>
</mah:MetroWindow>