107 lines
		
	
	
		
			5.2 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
		
		
			
		
	
	
			107 lines
		
	
	
		
			5.2 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
| 
								 | 
							
								<UserControl x:Class="DM_Weight.Views.Dialog.EditUserDialog"
							 | 
						||
| 
								 | 
							
								             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
							 | 
						||
| 
								 | 
							
								             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
							 | 
						||
| 
								 | 
							
								             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
							 | 
						||
| 
								 | 
							
								             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
							 | 
						||
| 
								 | 
							
								             xmlns:local="clr-namespace:DM_Weight.Views.Dialog"
							 | 
						||
| 
								 | 
							
								             xmlns:prism="http://prismlibrary.com/"
							 | 
						||
| 
								 | 
							
								             prism:ViewModelLocator.AutoWireViewModel="True"
							 | 
						||
| 
								 | 
							
								             xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
							 | 
						||
| 
								 | 
							
								             xmlns:convert="clr-namespace:DM_Weight.Converter"
							 | 
						||
| 
								 | 
							
								             MinWidth="450"
							 | 
						||
| 
								 | 
							
								             Width="Auto"
							 | 
						||
| 
								 | 
							
								             Height="Auto"
							 | 
						||
| 
								 | 
							
								             mc:Ignorable="d" >
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								    <materialDesign:Card Padding="0">
							 | 
						||
| 
								 | 
							
								        <Grid>
							 | 
						||
| 
								 | 
							
								            <Grid.RowDefinitions>
							 | 
						||
| 
								 | 
							
								                <RowDefinition Height="Auto" />
							 | 
						||
| 
								 | 
							
								                <RowDefinition Height="Auto" />
							 | 
						||
| 
								 | 
							
								                <RowDefinition Height="Auto" />
							 | 
						||
| 
								 | 
							
								                <RowDefinition Height="Auto" />
							 | 
						||
| 
								 | 
							
								            </Grid.RowDefinitions>
							 | 
						||
| 
								 | 
							
								            <Grid Background="#03a9f4" Grid.Row="0">
							 | 
						||
| 
								 | 
							
								                <TextBlock VerticalAlignment="Center" Foreground="{DynamicResource PrimaryHueDarkForegroundBrush}" Margin="16 4 16 4" Style="{StaticResource MaterialDesignHeadline5TextBlock}" Text="{Binding Title}" />
							 | 
						||
| 
								 | 
							
								                <Button
							 | 
						||
| 
								 | 
							
								                        Style="{StaticResource MaterialDesignIconForegroundButton}"
							 | 
						||
| 
								 | 
							
								                        Foreground="{DynamicResource PrimaryHueDarkForegroundBrush}"
							 | 
						||
| 
								 | 
							
								                        HorizontalAlignment="Right"
							 | 
						||
| 
								 | 
							
								                        Command="{Binding CancelCommand}"
							 | 
						||
| 
								 | 
							
								                        ToolTip="关闭" Cursor="Hand"
							 | 
						||
| 
								 | 
							
								                    >
							 | 
						||
| 
								 | 
							
								                    <materialDesign:PackIcon Kind="Close" Width="34" Height="34" />
							 | 
						||
| 
								 | 
							
								                </Button>
							 | 
						||
| 
								 | 
							
								            </Grid>
							 | 
						||
| 
								 | 
							
								            <Grid Grid.Row="1" Margin="0 4 0 4" Visibility="{Binding EditUser,Converter={StaticResource BooleanToVisibilityConverter}}">
							 | 
						||
| 
								 | 
							
								                <Grid.RowDefinitions>
							 | 
						||
| 
								 | 
							
								                    <RowDefinition />
							 | 
						||
| 
								 | 
							
								                    <RowDefinition />
							 | 
						||
| 
								 | 
							
								                    <RowDefinition />
							 | 
						||
| 
								 | 
							
								                    <RowDefinition />
							 | 
						||
| 
								 | 
							
								                    <RowDefinition />
							 | 
						||
| 
								 | 
							
								                </Grid.RowDefinitions>
							 | 
						||
| 
								 | 
							
								                <TextBox
							 | 
						||
| 
								 | 
							
								                    Grid.Row="0"
							 | 
						||
| 
								 | 
							
								                    Text="{Binding UserList.Nickname}"
							 | 
						||
| 
								 | 
							
								                    materialDesign:HintAssist.Hint="姓名"
							 | 
						||
| 
								 | 
							
								                     Margin="8 8 8 0"
							 | 
						||
| 
								 | 
							
								                    Style="{StaticResource MaterialDesignOutlinedTextBox}"/>
							 | 
						||
| 
								 | 
							
								                <TextBox
							 | 
						||
| 
								 | 
							
								                    Grid.Row="1"
							 | 
						||
| 
								 | 
							
								                    Text="{Binding UserList.UserName}"
							 | 
						||
| 
								 | 
							
								                    materialDesign:HintAssist.Hint="账号"
							 | 
						||
| 
								 | 
							
								                     Margin="8 8 8 0"
							 | 
						||
| 
								 | 
							
								                    Style="{StaticResource MaterialDesignOutlinedTextBox}"/>
							 | 
						||
| 
								 | 
							
								                <TextBox
							 | 
						||
| 
								 | 
							
								                    Grid.Row="2"
							 | 
						||
| 
								 | 
							
								                    Text="{Binding NewPass}"
							 | 
						||
| 
								 | 
							
								                    materialDesign:HintAssist.Hint="密码"
							 | 
						||
| 
								 | 
							
								                     Margin="8 8 8 0"
							 | 
						||
| 
								 | 
							
								                    Style="{StaticResource MaterialDesignOutlinedTextBox}"/>
							 | 
						||
| 
								 | 
							
								                <TextBox
							 | 
						||
| 
								 | 
							
								                    Grid.Row="3"
							 | 
						||
| 
								 | 
							
								                    Text="{Binding UserList.UserBarcode}"
							 | 
						||
| 
								 | 
							
								                    materialDesign:HintAssist.Hint="卡号"
							 | 
						||
| 
								 | 
							
								                     Margin="8 8 8 0"
							 | 
						||
| 
								 | 
							
								                    Style="{StaticResource MaterialDesignOutlinedTextBox}"/>
							 | 
						||
| 
								 | 
							
								                <ComboBox
							 | 
						||
| 
								 | 
							
								                    Margin="8 8 8 0"
							 | 
						||
| 
								 | 
							
								                    Grid.Row="4"
							 | 
						||
| 
								 | 
							
								                    Style="{StaticResource MaterialDesignOutlinedComboBox}"
							 | 
						||
| 
								 | 
							
								                    materialDesign:HintAssist.Hint="角色"
							 | 
						||
| 
								 | 
							
								                    ItemsSource="{Binding Roles}"
							 | 
						||
| 
								 | 
							
								                    SelectedValuePath="Id"
							 | 
						||
| 
								 | 
							
								                    SelectedValue="{Binding UserList.RoleId}"
							 | 
						||
| 
								 | 
							
								                    DisplayMemberPath="RoleName"/>
							 | 
						||
| 
								 | 
							
								            </Grid>
							 | 
						||
| 
								 | 
							
								            <Grid Grid.Row="2" Visibility="{Binding OnlyPassword,Converter={StaticResource BooleanToVisibilityConverter}}">
							 | 
						||
| 
								 | 
							
								                <Grid.RowDefinitions>
							 | 
						||
| 
								 | 
							
								                    <RowDefinition />
							 | 
						||
| 
								 | 
							
								                    <RowDefinition />
							 | 
						||
| 
								 | 
							
								                </Grid.RowDefinitions>
							 | 
						||
| 
								 | 
							
								                <TextBox
							 | 
						||
| 
								 | 
							
								                    Grid.Row="0"
							 | 
						||
| 
								 | 
							
								                    Text="{Binding OldPass, ValidatesOnExceptions=True}"
							 | 
						||
| 
								 | 
							
								                    materialDesign:HintAssist.Hint="旧密码"
							 | 
						||
| 
								 | 
							
								                    Margin="8 8 8 0"
							 | 
						||
| 
								 | 
							
								                    Style="{StaticResource MaterialDesignOutlinedTextBox}"/>
							 | 
						||
| 
								 | 
							
								                <TextBox
							 | 
						||
| 
								 | 
							
								                    Grid.Row="1"
							 | 
						||
| 
								 | 
							
								                    Text="{Binding NewPass}"
							 | 
						||
| 
								 | 
							
								                    materialDesign:HintAssist.Hint="新密码"
							 | 
						||
| 
								 | 
							
								                     Margin="8 8 8 0"
							 | 
						||
| 
								 | 
							
								                    Style="{StaticResource MaterialDesignOutlinedTextBox}"/>
							 | 
						||
| 
								 | 
							
								            </Grid>
							 | 
						||
| 
								 | 
							
								            <StackPanel Grid.Row="3" Orientation="Horizontal" HorizontalAlignment="Center">
							 | 
						||
| 
								 | 
							
								                <Button Content="确定"  Margin="8" Command="{Binding SaveUser}" />
							 | 
						||
| 
								 | 
							
								                <Button Content="取消"  Margin="8" Command="{Binding CancelCommand}"/>
							 | 
						||
| 
								 | 
							
								            </StackPanel>
							 | 
						||
| 
								 | 
							
								            
							 | 
						||
| 
								 | 
							
								            <!--<materialDesign:Snackbar
							 | 
						||
| 
								 | 
							
								                Background="{Binding SnackbarBackground}"
							 | 
						||
| 
								 | 
							
								                MessageQueue="{Binding SnackbarMessageQueue}"/>-->
							 | 
						||
| 
								 | 
							
								        </Grid>
							 | 
						||
| 
								 | 
							
								    </materialDesign:Card>
							 | 
						||
| 
								 | 
							
								</UserControl>
							 |