终端一体化运控平台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

AddNewUser.xaml 6.0 KiB

2 years ago
2 years ago
2 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. <UserControl x:Class="BPASmart.UserManagement.View.AddNewUser"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:local="clr-namespace:BPASmart.UserManagement.View"
  7. xmlns:common="clr-namespace:BPASmart.UserManagement.Helper"
  8. xmlns:vm="clr-namespace:BPASmart.UserManagement.ViewModel"
  9. mc:Ignorable="d"
  10. d:DesignHeight="450" d:DesignWidth="800">
  11. <UserControl.DataContext>
  12. <vm:AddNewUserViewModel/>
  13. </UserControl.DataContext>
  14. <Border Margin="100,40">
  15. <Border.Background>
  16. <ImageBrush ImageSource="../Image/user背景.png" Stretch="Fill"/>
  17. </Border.Background>
  18. <Grid>
  19. <Grid.RowDefinitions>
  20. <RowDefinition Height="14*"/>
  21. <RowDefinition Height="36*"/>
  22. <RowDefinition Height="192*"/>
  23. <RowDefinition Height="51*"/>
  24. <RowDefinition Height="77*"/>
  25. </Grid.RowDefinitions>
  26. <TextBlock Grid.Row="1" Text="注册新用户" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="#009DFF"
  27. FontSize="24" Height="30" Width="120"/>
  28. <Grid Grid.Row="2" Margin="10" VerticalAlignment="Center" Width="250">
  29. <Grid.RowDefinitions>
  30. <RowDefinition Height="*"/>
  31. <RowDefinition Height="*"/>
  32. <RowDefinition Height="*"/>
  33. </Grid.RowDefinitions>
  34. <TextBox
  35. Name="Username"
  36. Margin="5,5"
  37. BorderBrush="#009DFF"
  38. BorderThickness="3"
  39. FontSize="18"
  40. Foreground="#009DFF"
  41. KeyDown="TextBox_KeyDown"
  42. Height="40"
  43. Style="{DynamicResource UserTextBoxStyle}"
  44. TabIndex="1"
  45. Text="{Binding UserName}" />
  46. <PasswordBox
  47. Name="pb"
  48. Grid.Row="1"
  49. Margin="5"
  50. common:PasswordHelper.Attach="True"
  51. common:PasswordHelper.Password="{Binding UserPassword, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
  52. BorderBrush="#009DFF"
  53. BorderThickness="3"
  54. FontSize="20"
  55. Height="40"
  56. Foreground="#009DFF"
  57. KeyDown="pb_KeyDown"
  58. PasswordChanged="PasswordBox_PasswordChanged"
  59. Style="{DynamicResource PasswordBoxStyle}"
  60. TabIndex="2" />
  61. <PasswordBox
  62. Name="pb2"
  63. Grid.Row="2"
  64. Margin="5"
  65. common:PasswordHelper.Attach="True"
  66. common:PasswordHelper.Password="{Binding ConfirmPassword, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
  67. BorderBrush="#009DFF"
  68. BorderThickness="3"
  69. FontSize="20"
  70. Height="40"
  71. Foreground="#009DFF"
  72. KeyDown="pb2_KeyDown"
  73. PasswordChanged="PasswordBox2_PasswordChanged"
  74. Style="{DynamicResource PasswordBoxStyle}"
  75. TabIndex="2" />
  76. <TextBlock
  77. Name="markText"
  78. Grid.Row="1"
  79. Margin="58,5"
  80. HorizontalAlignment="Left"
  81. VerticalAlignment="Center"
  82. FontSize="16"
  83. Foreground="#88009dff"
  84. IsHitTestVisible="False"
  85. Text="请输入账号密码"
  86. Visibility="Visible" />
  87. <TextBlock
  88. Name="mark2Text"
  89. Grid.Row="2"
  90. Margin="58,5"
  91. HorizontalAlignment="Left"
  92. VerticalAlignment="Center"
  93. FontSize="16"
  94. Foreground="#88009dff"
  95. IsHitTestVisible="False"
  96. Text="请再次确认密码"
  97. Visibility="Visible" />
  98. </Grid>
  99. <StackPanel Grid.Row="3" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="top">
  100. <Button
  101. x:Name="registerButton"
  102. Grid.Column="1"
  103. Command="{Binding ResgisterUserCommand}"
  104. Content="注 册"
  105. Style="{StaticResource CommonButton}"
  106. FontSize="20"
  107. TabIndex="3"
  108. Width="120"
  109. Background="#009DFF"
  110. Foreground="White"
  111. VerticalAlignment="Top"
  112. Margin="20,0"/>
  113. <Button
  114. Command="{Binding ExitCommand}"
  115. Content="退 出" FontSize="20"
  116. Width="120"
  117. Style="{StaticResource CommonButton}"
  118. Background="#009DFF"
  119. Foreground="White"
  120. VerticalAlignment="Top"
  121. Margin="20,0"
  122. />
  123. </StackPanel>
  124. <StackPanel Grid.Row="4" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Top" Visibility="{Binding ErrorVisibility}">
  125. <Image Source="../image/科技警告.png" Width="25" Height="25" Stretch="Fill"/>
  126. <TextBlock Margin="10,0" Text="{Binding ErrorMessage}" Foreground="#FF3F36" FontSize="20" HorizontalAlignment="Center" VerticalAlignment="Center"/>
  127. </StackPanel>
  128. </Grid>
  129. </Border>
  130. </UserControl>