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

375 regels
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:common="clr-namespace:BPASmartClient.CustomResource.Pages.Model"
  6. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  7. xmlns:local="clr-namespace:BPASmartClient.CustomResource.Pages.View"
  8. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  9. xmlns:vm="clr-namespace:BPASmartClient.CustomResource.Pages.ViewModel"
  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. Margin="0,0,0,10"
  157. FontSize="16"
  158. Foreground="#32B8FF"
  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. Width="80"
  207. Height="21"
  208. HorizontalAlignment="Center"
  209. VerticalAlignment="Center"
  210. FontSize="16"
  211. Foreground="#FF32B8FF"
  212. Text="当前卡号:" />
  213. <TextBlock
  214. Grid.Row="1"
  215. Width="64"
  216. Height="20"
  217. HorizontalAlignment="Center"
  218. VerticalAlignment="Center"
  219. FontSize="16"
  220. Foreground="#FF32B8FF"
  221. Text="用户名:" />
  222. <TextBlock
  223. Grid.Row="2"
  224. Width="80"
  225. Height="20"
  226. HorizontalAlignment="Center"
  227. VerticalAlignment="Center"
  228. FontSize="16"
  229. Foreground="#FF32B8FF"
  230. Text="当前密码:" />
  231. <TextBlock
  232. Grid.Row="3"
  233. Width="80"
  234. Height="20"
  235. HorizontalAlignment="Center"
  236. VerticalAlignment="Center"
  237. FontSize="16"
  238. Foreground="#FF32B8FF"
  239. Text="确认密码:" />
  240. <TextBlock
  241. Grid.Column="1"
  242. HorizontalAlignment="Center"
  243. VerticalAlignment="Center"
  244. FontSize="16"
  245. Foreground="#FF32B8FF"
  246. Text="{Binding CardNum}" />
  247. <TextBox
  248. Grid.Row="1"
  249. Grid.Column="1"
  250. Margin="11,4,10,4"
  251. Style="{DynamicResource UserTextBoxStyle}"
  252. Text="{Binding UserName}" />
  253. <PasswordBox
  254. Name="newpb1"
  255. Grid.Row="2"
  256. Grid.Column="1"
  257. Margin="11,4,10,4"
  258. common:PasswordHelper.Attach="True"
  259. common:PasswordHelper.Password="{Binding CurrentPassword, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
  260. BorderBrush="#009DFF"
  261. FontSize="16"
  262. Foreground="#aadddddd"
  263. Style="{DynamicResource PasswordBoxStyle}"
  264. TabIndex="2" />
  265. <PasswordBox
  266. Name="newpb2"
  267. Grid.Row="3"
  268. Grid.Column="1"
  269. Margin="11,4,10,4"
  270. common:PasswordHelper.Attach="True"
  271. common:PasswordHelper.Password="{Binding CheckPassword, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
  272. BorderBrush="#009DFF"
  273. FontSize="16"
  274. Foreground="#aadddddd"
  275. Style="{DynamicResource PasswordBoxStyle}"
  276. TabIndex="2" />
  277. <TextBlock
  278. Grid.Row="2"
  279. Grid.Column="2"
  280. Width="62"
  281. Height="12"
  282. HorizontalAlignment="Center"
  283. VerticalAlignment="Center"
  284. FontSize="10"
  285. Foreground="#FF32B8FF"
  286. Text="(默认888888)" />
  287. <TextBlock
  288. Grid.Row="4"
  289. Grid.Column="0"
  290. Grid.ColumnSpan="3"
  291. HorizontalAlignment="Center"
  292. VerticalAlignment="Center"
  293. FontSize="16"
  294. Foreground="#FFF53F62"
  295. Text="{Binding Info}" />
  296. </Grid>
  297. <Grid Grid.Row="1">
  298. <Grid.ColumnDefinitions>
  299. <ColumnDefinition />
  300. <ColumnDefinition />
  301. </Grid.ColumnDefinitions>
  302. <Button
  303. HorizontalAlignment="Center"
  304. VerticalAlignment="Center"
  305. HorizontalContentAlignment="Center"
  306. VerticalContentAlignment="Center"
  307. Command="{Binding UserAddCommand}"
  308. Content="用户添加"
  309. FontSize="16"
  310. Style="{DynamicResource ButtonStyle}" />
  311. <Button
  312. Grid.Column="1"
  313. HorizontalAlignment="Center"
  314. VerticalAlignment="Center"
  315. HorizontalContentAlignment="Center"
  316. VerticalContentAlignment="Center"
  317. Command="{Binding UserCancelCommand}"
  318. Content="用户注销"
  319. FontSize="16"
  320. Style="{DynamicResource ButtonStyle}" />
  321. </Grid>
  322. </Grid>
  323. <Border
  324. Width="20"
  325. Height="20"
  326. Margin="0,18,18,0"
  327. HorizontalAlignment="Right"
  328. VerticalAlignment="Top"
  329. Background="Transparent"
  330. MouseLeftButtonDown="Border_MouseLeftButtonDown" />
  331. </Grid>
  332. </Grid>
  333. </Window>