Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.

288 righe
12 KiB

  1. <hc:Window
  2. x:Class="HKCardIN.Views.RootView"
  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:hc="https://handyorg.github.io/handycontrol"
  7. xmlns:local="clr-namespace:HKCardIN"
  8. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  9. xmlns:s="https://github.com/canton7/Stylet"
  10. xmlns:viewModels="clr-namespace:HKCardIN.ViewModels"
  11. Title="海科智慧一卡通平台"
  12. Width="700"
  13. Height="420"
  14. d:DataContext="{d:DesignInstance Type=viewModels:RootViewModel}"
  15. ShowMaxButton="False"
  16. ShowTitle="True"
  17. WindowStartupLocation="CenterScreen"
  18. mc:Ignorable="d">
  19. <hc:Window.Resources>
  20. <Style
  21. x:Key="充值"
  22. BasedOn="{StaticResource ButtonDefault}"
  23. TargetType="Button">
  24. <Setter Property="Width" Value="75" />
  25. <Setter Property="Height" Value="75" />
  26. <Setter Property="Margin" Value="5" />
  27. <Setter Property="Foreground" Value="Red" />
  28. <Setter Property="FontSize" Value="18" />
  29. </Style>
  30. <Style
  31. x:Key="操作"
  32. BasedOn="{StaticResource ButtonDefault}"
  33. TargetType="Button">
  34. <Setter Property="Width" Value="120" />
  35. <Setter Property="Height" Value="75" />
  36. <Setter Property="Margin" Value="5" />
  37. <Setter Property="Foreground" Value="Red" />
  38. <Setter Property="FontSize" Value="18" />
  39. </Style>
  40. </hc:Window.Resources>
  41. <hc:Window.InputBindings>
  42. <KeyBinding
  43. Key="F1"
  44. Command="{s:Action InputAction}"
  45. CommandParameter="50" />
  46. <KeyBinding
  47. Key="F2"
  48. Command="{s:Action InputAction}"
  49. CommandParameter="100" />
  50. <KeyBinding
  51. Key="F3"
  52. Command="{s:Action InputAction}"
  53. CommandParameter="200" />
  54. <KeyBinding
  55. Key="F4"
  56. Command="{s:Action InputAction}"
  57. CommandParameter="500" />
  58. <KeyBinding Key="F5" Command="{s:Action LockSreenAction}" />
  59. </hc:Window.InputBindings>
  60. <Grid>
  61. <StackPanel
  62. HorizontalAlignment="Center"
  63. VerticalAlignment="Center"
  64. Visibility="{Binding CodeVisible}">
  65. <TextBox
  66. Width="200"
  67. hc:InfoElement.Placeholder="请输入解锁码"
  68. Style="{StaticResource TextBoxExtend}"
  69. Text="{Binding LockCode}" />
  70. <WrapPanel Margin="0,10,0,0" HorizontalAlignment="Center">
  71. <Button
  72. Width="60"
  73. Height="40"
  74. Margin="0,0,10,0"
  75. Command="{s:Action UnLockAction}"
  76. Content="确定"
  77. FontSize="15" />
  78. <Button
  79. Width="60"
  80. Height="40"
  81. Margin="10,0,0,0"
  82. Command="{s:Action ResetAction}"
  83. Content="取消"
  84. FontSize="15" />
  85. </WrapPanel>
  86. </StackPanel>
  87. <Grid Visibility="{Binding ContentVisible}">
  88. <Grid.ColumnDefinitions>
  89. <ColumnDefinition />
  90. <ColumnDefinition />
  91. </Grid.ColumnDefinitions>
  92. <StackPanel Margin="0,12,0,0">
  93. <Grid>
  94. <Grid.ColumnDefinitions>
  95. <ColumnDefinition Width=".4*" />
  96. <ColumnDefinition Width=".6*" />
  97. </Grid.ColumnDefinitions>
  98. <Border
  99. Width="100"
  100. Height="120"
  101. BorderBrush="BlanchedAlmond"
  102. BorderThickness="1">
  103. <Border.Effect>
  104. <DropShadowEffect ShadowDepth="1" Color="Black" />
  105. </Border.Effect>
  106. <Image
  107. Width="100"
  108. Height="120"
  109. Source="/HKResouces/头像.png"
  110. Stretch="UniformToFill" />
  111. </Border>
  112. <StackPanel Grid.Column="1">
  113. <WrapPanel>
  114. <TextBlock
  115. FontSize="18"
  116. Style="{StaticResource TextBlockDefaultBold}"
  117. Text="姓名:" />
  118. <TextBlock
  119. FontSize="18"
  120. Foreground="Red"
  121. Style="{StaticResource TextBlockDefaultBold}"
  122. Text="李四" />
  123. </WrapPanel>
  124. <WrapPanel Margin="0,20,0,0">
  125. <TextBlock
  126. FontSize="18"
  127. Style="{StaticResource TextBlockDefaultBold}"
  128. Text="手机:" />
  129. <TextBlock
  130. FontSize="18"
  131. Foreground="Red"
  132. Style="{StaticResource TextBlockDefaultBold}"
  133. Text="13812345678" />
  134. </WrapPanel>
  135. <WrapPanel Margin="0,20,0,0">
  136. <TextBlock
  137. FontSize="18"
  138. Style="{StaticResource TextBlockDefaultBold}"
  139. Text="员工号:" />
  140. <TextBlock
  141. FontSize="18"
  142. Foreground="Red"
  143. Style="{StaticResource TextBlockDefaultBold}"
  144. Text="001" />
  145. </WrapPanel>
  146. </StackPanel>
  147. </Grid>
  148. <hc:Divider
  149. Content="卡信息"
  150. FontSize="16"
  151. FontWeight="Bold" />
  152. <StackPanel Margin="20,0,0,0">
  153. <WrapPanel>
  154. <TextBlock
  155. FontSize="18"
  156. Style="{StaticResource TextBlockDefaultBold}"
  157. Text="卡号:" />
  158. <TextBlock
  159. FontSize="18"
  160. Foreground="Red"
  161. Style="{StaticResource TextBlockDefaultBold}"
  162. Text="123456" />
  163. </WrapPanel>
  164. <WrapPanel Margin="0,20,0,0">
  165. <TextBlock
  166. FontSize="18"
  167. Style="{StaticResource TextBlockDefaultBold}"
  168. Text="卡状态:" />
  169. <TextBlock
  170. FontSize="18"
  171. Foreground="Red"
  172. Style="{StaticResource TextBlockDefaultBold}"
  173. Text="正常" />
  174. </WrapPanel>
  175. <WrapPanel Margin="0,20,0,0">
  176. <TextBlock
  177. FontSize="18"
  178. Style="{StaticResource TextBlockDefaultBold}"
  179. Text="卡上余额:" />
  180. <TextBlock
  181. FontSize="18"
  182. Foreground="Red"
  183. Style="{StaticResource TextBlockDefaultBold}"
  184. Text="123456" />
  185. </WrapPanel>
  186. <WrapPanel Margin="0,20,0,0">
  187. <TextBlock
  188. FontSize="18"
  189. Style="{StaticResource TextBlockDefaultBold}"
  190. Text="启用日期:" />
  191. <TextBlock
  192. FontSize="18"
  193. Foreground="Red"
  194. Style="{StaticResource TextBlockDefaultBold}"
  195. Text="2021-01-01" />
  196. </WrapPanel>
  197. </StackPanel>
  198. </StackPanel>
  199. <StackPanel Grid.Column="1">
  200. <hc:Divider
  201. Content="充值金额"
  202. FontSize="16"
  203. FontWeight="Bold" />
  204. <TextBlock Margin="5,0,0,0" FontSize="15">
  205. <Run Text="当前充值金额:" />
  206. <Run Foreground="Red" Text="{Binding ShowMoney}" />
  207. </TextBlock>
  208. <WrapPanel>
  209. <Button
  210. Command="{s:Action InputAction}"
  211. CommandParameter="50"
  212. Style="{StaticResource 充值}">
  213. <Button.Content>
  214. <StackPanel HorizontalAlignment="Center">
  215. <TextBlock HorizontalAlignment="Center" Text="¥50" />
  216. <TextBlock HorizontalAlignment="Center" Text="[F1]" />
  217. </StackPanel>
  218. </Button.Content>
  219. </Button>
  220. <Button
  221. Command="{s:Action InputAction}"
  222. CommandParameter="100"
  223. Style="{StaticResource 充值}">
  224. <Button.Content>
  225. <StackPanel HorizontalAlignment="Center">
  226. <TextBlock HorizontalAlignment="Center" Text="¥100" />
  227. <TextBlock HorizontalAlignment="Center" Text="[F2]" />
  228. </StackPanel>
  229. </Button.Content>
  230. </Button>
  231. <Button
  232. Command="{s:Action InputAction}"
  233. CommandParameter="200"
  234. Style="{StaticResource 充值}">
  235. <Button.Content>
  236. <StackPanel HorizontalAlignment="Center">
  237. <TextBlock HorizontalAlignment="Center" Text="¥200" />
  238. <TextBlock HorizontalAlignment="Center" Text="[F3]" />
  239. </StackPanel>
  240. </Button.Content>
  241. </Button>
  242. <Button
  243. Command="{s:Action InputAction}"
  244. CommandParameter="500"
  245. Style="{StaticResource 充值}">
  246. <Button.Content>
  247. <StackPanel HorizontalAlignment="Center">
  248. <TextBlock HorizontalAlignment="Center" Text="¥500" />
  249. <TextBlock HorizontalAlignment="Center" Text="[F4]" />
  250. </StackPanel>
  251. </Button.Content>
  252. </Button>
  253. </WrapPanel>
  254. <TextBox
  255. Width="330"
  256. Margin="5,10,0,10"
  257. HorizontalAlignment="Left"
  258. hc:InfoElement.Placeholder="请输入自定义金额"
  259. Style="{StaticResource TextBoxExtend}">
  260. <TextBox.Text>
  261. <Binding Path="InputMoney" UpdateSourceTrigger="PropertyChanged">
  262. <Binding.ValidationRules>
  263. <local:ValidataRule />
  264. </Binding.ValidationRules>
  265. </Binding>
  266. </TextBox.Text>
  267. </TextBox>
  268. <hc:Divider
  269. Content="操作"
  270. FontSize="16"
  271. FontWeight="Bold" />
  272. <WrapPanel HorizontalAlignment="Center">
  273. <Button
  274. Command="{s:Action SaveAction}"
  275. Content="确定[Enter]"
  276. IsDefault="True"
  277. Style="{StaticResource 操作}" />
  278. <Button
  279. Command="{s:Action LockSreenAction}"
  280. Content="锁屏[F5]"
  281. IsDefault="True"
  282. Style="{StaticResource 操作}" />
  283. </WrapPanel>
  284. </StackPanel>
  285. </Grid>
  286. </Grid>
  287. </hc:Window>