终端一体化运控平台
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.
 
 
 

348 lines
16 KiB

  1. <Window
  2. x:Class="BPASmartClient.CustomResource.Pages.View.NfcSetView"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:local="clr-namespace:BPASmartClient.CustomResource.Pages.View"
  7. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  8. xmlns:vm="clr-namespace:BPASmartClient.CustomResource.Pages.ViewModel"
  9. xmlns:common="clr-namespace:BPASmartClient.CustomResource.Pages.Model"
  10. Title="NfcSetView"
  11. Width="500"
  12. Height="250"
  13. AllowsTransparency="True"
  14. Background="{x:Null}"
  15. Topmost="True"
  16. WindowStartupLocation="CenterScreen"
  17. WindowStyle="None"
  18. mc:Ignorable="d">
  19. <Window.DataContext>
  20. <vm:NfcSetViewModel />
  21. </Window.DataContext>
  22. <Window.Resources>
  23. <Style x:Key="rbStyle" TargetType="RadioButton">
  24. <Setter Property="Foreground" Value="#32b8ff" />
  25. <Setter Property="Margin" Value="0,5,0,5" />
  26. <Setter Property="HorizontalAlignment" Value="Center" />
  27. <Setter Property="FontSize" Value="14" />
  28. <Setter Property="GroupName" Value="all" />
  29. <Setter Property="Template">
  30. <Setter.Value>
  31. <ControlTemplate TargetType="RadioButton">
  32. <Grid
  33. Name="gr"
  34. Background="Transparent"
  35. Opacity="0.8">
  36. <Grid.ColumnDefinitions>
  37. <ColumnDefinition Width="Auto" />
  38. <ColumnDefinition />
  39. </Grid.ColumnDefinitions>
  40. <ContentControl
  41. Name="cc"
  42. Grid.Column="1"
  43. Margin="{TemplateBinding Margin}"
  44. HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
  45. VerticalAlignment="{TemplateBinding VerticalAlignment}"
  46. HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
  47. VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
  48. Content="{TemplateBinding Content}"
  49. FontSize="{TemplateBinding FontSize}" />
  50. <Grid Margin="0,0,4,0">
  51. <Ellipse
  52. Name="e2"
  53. Width="{Binding ElementName=cc, Path=ActualHeight}"
  54. Height="{Binding ElementName=cc, Path=ActualHeight}"
  55. HorizontalAlignment="Center"
  56. VerticalAlignment="Center"
  57. Fill="Transparent"
  58. Stroke="{Binding ElementName=cc, Path=Foreground}"
  59. StrokeThickness="1" />
  60. <Ellipse
  61. Name="el"
  62. Width="{Binding ElementName=cc, Path=FontSize}"
  63. Height="{Binding ElementName=cc, Path=FontSize}"
  64. HorizontalAlignment="Center"
  65. VerticalAlignment="Center"
  66. Fill="Transparent"
  67. Stroke="{Binding ElementName=cc, Path=Foreground}"
  68. StrokeThickness="0" />
  69. </Grid>
  70. </Grid>
  71. <ControlTemplate.Triggers>
  72. <Trigger Property="IsChecked" Value="True">
  73. <Setter TargetName="el" Property="Fill" Value="#32b8ff" />
  74. </Trigger>
  75. <Trigger Property="IsMouseOver" Value="True">
  76. <Setter TargetName="gr" Property="Opacity" Value="1" />
  77. </Trigger>
  78. </ControlTemplate.Triggers>
  79. </ControlTemplate>
  80. </Setter.Value>
  81. </Setter>
  82. </Style>
  83. <Style x:Key="buttonStyle" TargetType="Button">
  84. <Setter Property="Margin" Value="10" />
  85. <Setter Property="FontSize" Value="17" />
  86. <Setter Property="Foreground" Value="#32b8ff" />
  87. <Setter Property="FontWeight" Value="SemiBold" />
  88. <Setter Property="FontFamily" Value="楷体" />
  89. <Setter Property="Template">
  90. <Setter.Value>
  91. <ControlTemplate TargetType="Button">
  92. <Border
  93. Name="TitleBarBr"
  94. BorderBrush="#00c2f4"
  95. BorderThickness="0"
  96. Opacity="0.8">
  97. <ContentPresenter
  98. Margin="{TemplateBinding Margin}"
  99. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  100. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  101. Content="{TemplateBinding Content}" />
  102. <Border.Background>
  103. <ImageBrush ImageSource="../../Image/组 8.png" Stretch="Fill" />
  104. </Border.Background>
  105. </Border>
  106. <ControlTemplate.Triggers>
  107. <Trigger Property="IsMouseOver" Value="true">
  108. <Setter TargetName="TitleBarBr" Property="Opacity" Value="1" />
  109. </Trigger>
  110. </ControlTemplate.Triggers>
  111. </ControlTemplate>
  112. </Setter.Value>
  113. </Setter>
  114. </Style>
  115. <!--#region 密码输入框样式-->
  116. <Style x:Key="PasswordBoxStyle" TargetType="{x:Type PasswordBox}">
  117. <Setter Property="Background" Value="Transparent" />
  118. <Setter Property="FontFamily" Value="Times New Roman" />
  119. <Setter Property="PasswordChar" Value="●" />
  120. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
  121. <Setter Property="KeyboardNavigation.TabNavigation" Value="None" />
  122. <Setter Property="HorizontalContentAlignment" Value="Left" />
  123. <Setter Property="Padding" Value="1" />
  124. <Setter Property="FocusVisualStyle" Value="{x:Null}" />
  125. <Setter Property="AllowDrop" Value="true" />
  126. <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst" />
  127. <Setter Property="Stylus.IsFlicksEnabled" Value="False" />
  128. <Setter Property="CaretBrush" Value="#009DFF" />
  129. <Setter Property="Background" Value="Transparent" />
  130. <Setter Property="BorderBrush" Value="#009DFF" />
  131. <Setter Property="BorderThickness" Value="0,0,0,1" />
  132. </Style>
  133. <!--#endregion-->
  134. <!--#region 用户输入框样式-->
  135. <Style x:Key="UserTextBoxStyle" TargetType="TextBox">
  136. <Setter Property="Background" Value="Transparent" />
  137. <Setter Property="CaretBrush" Value="#009DFF" />
  138. <Setter Property="BorderBrush" Value="#009DFF"/>
  139. <Setter Property="BorderThickness" Value="0,0,0,1"/>
  140. <Setter Property="Foreground" Value="White"/>
  141. <Setter Property="FontSize" Value="14" />
  142. </Style>
  143. <!--#endregion-->
  144. </Window.Resources>
  145. <Grid>
  146. <Grid.Background>
  147. <ImageBrush ImageSource="../../Image/弹窗.png" Stretch="Fill" />
  148. </Grid.Background>
  149. <Grid.ColumnDefinitions>
  150. <ColumnDefinition Width="0.5*" />
  151. <ColumnDefinition />
  152. </Grid.ColumnDefinitions>
  153. <Grid Background="Transparent">
  154. <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
  155. <TextBlock
  156. FontSize="16"
  157. Foreground="#32B8FF"
  158. Margin="0,0,0,10"
  159. Text="用户权限列表:" />
  160. <ItemsControl ItemsSource="{Binding permissions}">
  161. <ItemsControl.ItemTemplate>
  162. <DataTemplate>
  163. <Grid>
  164. <RadioButton
  165. Content="{Binding PermissionName}"
  166. IsChecked="{Binding PermissionSelected}"
  167. Style="{StaticResource rbStyle}" />
  168. </Grid>
  169. </DataTemplate>
  170. </ItemsControl.ItemTemplate>
  171. </ItemsControl>
  172. </StackPanel>
  173. </Grid>
  174. <Grid Grid.Column="1">
  175. <Border
  176. Width="1"
  177. Margin="0,20,0,20"
  178. HorizontalAlignment="Left">
  179. <Border.Background>
  180. <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
  181. <GradientStop Color="#FF0B2E56" />
  182. <GradientStop Offset="1" Color="#FF0B2E56" />
  183. <GradientStop Offset="0.58" Color="#FF32B8FF" />
  184. </LinearGradientBrush>
  185. </Border.Background>
  186. </Border>
  187. <Grid Margin="10,30,30,30">
  188. <Grid.RowDefinitions>
  189. <RowDefinition />
  190. <RowDefinition Height="0.25*" />
  191. </Grid.RowDefinitions>
  192. <Grid>
  193. <Grid.RowDefinitions>
  194. <RowDefinition />
  195. <RowDefinition />
  196. <RowDefinition />
  197. <RowDefinition />
  198. <RowDefinition />
  199. </Grid.RowDefinitions>
  200. <Grid.ColumnDefinitions>
  201. <ColumnDefinition Width="92*"/>
  202. <ColumnDefinition Width="135*"/>
  203. <ColumnDefinition Width="67*"/>
  204. </Grid.ColumnDefinitions>
  205. <TextBlock
  206. HorizontalAlignment="Center"
  207. FontSize="16"
  208. VerticalAlignment="Center"
  209. Foreground="#FF32B8FF"
  210. Text="当前卡号:" Height="21" Width="80" />
  211. <TextBlock Grid.Row="1"
  212. HorizontalAlignment="Center"
  213. FontSize="16"
  214. VerticalAlignment="Center"
  215. Foreground="#FF32B8FF"
  216. Text="用户名:" Height="20" Width="64" />
  217. <TextBlock Grid.Row="2"
  218. HorizontalAlignment="Center"
  219. FontSize="16"
  220. VerticalAlignment="Center"
  221. Foreground="#FF32B8FF"
  222. Text="当前密码:" Height="20" Width="80" />
  223. <TextBlock Grid.Row="3"
  224. HorizontalAlignment="Center"
  225. FontSize="16"
  226. VerticalAlignment="Center"
  227. Foreground="#FF32B8FF"
  228. Text="确认密码:" Height="20" Width="80" />
  229. <TextBlock Grid.Column="1"
  230. HorizontalAlignment="Center"
  231. VerticalAlignment="Center"
  232. FontSize="16"
  233. Foreground="#FF32B8FF"
  234. Text="{Binding CardNum}" />
  235. <TextBox Grid.Row="1" Grid.Column="1"
  236. Margin="11,4,10,4"
  237. Text="{Binding UserName}"
  238. Style="{DynamicResource UserTextBoxStyle}"/>
  239. <PasswordBox Grid.Column="1" Grid.Row="2"
  240. Name="newpb1"
  241. Margin="11,4,10,4"
  242. common:PasswordHelper.Attach="True"
  243. common:PasswordHelper.Password="{Binding CurrentPassword, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
  244. BorderBrush="#009DFF"
  245. FontSize="16"
  246. Foreground="#aadddddd"
  247. Style="{DynamicResource PasswordBoxStyle}"
  248. TabIndex="2" />
  249. <PasswordBox Grid.Column="1" Grid.Row="3"
  250. Name="newpb2"
  251. Margin="11,4,10,4"
  252. common:PasswordHelper.Attach="True"
  253. common:PasswordHelper.Password="{Binding CheckPassword, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
  254. BorderBrush="#009DFF"
  255. FontSize="16"
  256. Foreground="#aadddddd"
  257. Style="{DynamicResource PasswordBoxStyle}"
  258. TabIndex="2" />
  259. <TextBlock Grid.Row="2" Grid.Column="2"
  260. HorizontalAlignment="Center"
  261. FontSize="10"
  262. VerticalAlignment="Center"
  263. Foreground="#FF32B8FF"
  264. Text="(默认888888)" Height="12" Width="62" />
  265. <TextBlock Grid.Row="4" Grid.ColumnSpan="3" Grid.Column="0"
  266. VerticalAlignment="Center"
  267. HorizontalAlignment="Center"
  268. FontSize="16"
  269. Foreground="#FFF53F62"
  270. Text="{Binding Info}" />
  271. </Grid>
  272. <Grid Grid.Row="1">
  273. <Grid.ColumnDefinitions>
  274. <ColumnDefinition />
  275. <ColumnDefinition />
  276. </Grid.ColumnDefinitions>
  277. <Button VerticalAlignment="Center"
  278. HorizontalAlignment="Center"
  279. HorizontalContentAlignment="Center"
  280. VerticalContentAlignment="Center"
  281. Content="用户添加"
  282. FontSize="16"
  283. Style="{DynamicResource ButtonStyle}"
  284. Command="{Binding UserAddCommand}"/>
  285. <Button Grid.Column="1"
  286. VerticalAlignment="Center"
  287. HorizontalAlignment="Center"
  288. HorizontalContentAlignment="Center"
  289. VerticalContentAlignment="Center"
  290. Content="用户注销"
  291. FontSize="16"
  292. Style="{DynamicResource ButtonStyle}"
  293. Command="{Binding UserCancelCommand}"/>
  294. </Grid>
  295. </Grid>
  296. <Border
  297. Width="20"
  298. Height="20"
  299. Margin="0,18,18,0"
  300. HorizontalAlignment="Right"
  301. VerticalAlignment="Top"
  302. Background="Transparent"
  303. MouseLeftButtonDown="Border_MouseLeftButtonDown" />
  304. </Grid>
  305. </Grid>
  306. </Window>