選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

RootView.xaml 14 KiB

2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324
  1. <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. x:Name="Root"
  12. Title="海科智慧一卡通平台"
  13. Width="900"
  14. Height="480"
  15. d:DataContext="{d:DesignInstance Type=viewModels:RootViewModel}"
  16. ResizeMode="CanMinimize"
  17. WindowStartupLocation="CenterScreen"
  18. mc:Ignorable="d">
  19. <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. <Style
  41. x:Key="Title"
  42. BasedOn="{StaticResource TextBlockDefaultBold}"
  43. TargetType="TextBlock">
  44. <Setter Property="Foreground" Value="WhiteSmoke" />
  45. </Style>
  46. </Window.Resources>
  47. <Window.Background>
  48. <ImageBrush ImageSource="/HKResouces/背景.jpg" />
  49. </Window.Background>
  50. <Window.InputBindings>
  51. <KeyBinding
  52. Key="E"
  53. Command="{s:Action UnLockAction}"
  54. CommandParameter="{Binding ., ElementName=Pwd}" />
  55. <KeyBinding Key="R" Command="{s:Action ReadAction}" />
  56. <KeyBinding
  57. Key="F1"
  58. Command="{s:Action InputAction}"
  59. CommandParameter="50" />
  60. <KeyBinding
  61. Key="F2"
  62. Command="{s:Action InputAction}"
  63. CommandParameter="100" />
  64. <KeyBinding
  65. Key="F3"
  66. Command="{s:Action InputAction}"
  67. CommandParameter="200" />
  68. <KeyBinding
  69. Key="F4"
  70. Command="{s:Action InputAction}"
  71. CommandParameter="500" />
  72. <KeyBinding Key="F5" Command="{s:Action LockSreenAction}" />
  73. </Window.InputBindings>
  74. <Grid>
  75. <StackPanel
  76. HorizontalAlignment="Center"
  77. VerticalAlignment="Center"
  78. Visibility="{Binding CodeVisible}">
  79. <hc:PasswordBox
  80. x:Name="Pwd"
  81. Width="200"
  82. hc:InfoElement.Placeholder="请输入解锁码"
  83. hc:PasswordBoxAttach.PasswordLength="20"
  84. ShowClearButton="True"
  85. Style="{StaticResource PasswordBoxPlusBaseStyle}" />
  86. <WrapPanel Margin="0,10,0,0" HorizontalAlignment="Center">
  87. <Button
  88. Width="70"
  89. Height="40"
  90. Margin="0,0,10,0"
  91. Command="{s:Action UnLockAction}"
  92. CommandParameter="{Binding ., ElementName=Pwd}"
  93. Content="确定[E]"
  94. FontSize="15" />
  95. </WrapPanel>
  96. </StackPanel>
  97. <Grid Visibility="{Binding ContentVisible}">
  98. <Grid.ColumnDefinitions>
  99. <ColumnDefinition />
  100. <ColumnDefinition Width="13" />
  101. <ColumnDefinition />
  102. </Grid.ColumnDefinitions>
  103. <StackPanel Margin="0,12,0,0">
  104. <Grid>
  105. <Grid.ColumnDefinitions>
  106. <ColumnDefinition Width=".4*" />
  107. <ColumnDefinition Width=".6*" />
  108. </Grid.ColumnDefinitions>
  109. <Border
  110. Width="100"
  111. Height="120"
  112. BorderBrush="BlanchedAlmond"
  113. BorderThickness="1">
  114. <Border.Effect>
  115. <DropShadowEffect ShadowDepth="1" Color="Black" />
  116. </Border.Effect>
  117. <Image
  118. Width="100"
  119. Height="120"
  120. Source="{Binding Info.MemberHeadImgUrl}"
  121. Stretch="UniformToFill" />
  122. </Border>
  123. <StackPanel Grid.Column="1">
  124. <WrapPanel>
  125. <TextBlock
  126. FontSize="18"
  127. Style="{StaticResource Title}"
  128. Text="姓名:" />
  129. <TextBlock
  130. FontSize="18"
  131. Foreground="Red"
  132. Style="{StaticResource TextBlockDefaultBold}"
  133. Text="{Binding Info.MemberName}" />
  134. </WrapPanel>
  135. <WrapPanel Margin="0,20,0,0">
  136. <TextBlock
  137. FontSize="18"
  138. Style="{StaticResource Title}"
  139. Text="手机:" />
  140. <TextBlock
  141. FontSize="18"
  142. Foreground="Red"
  143. Style="{StaticResource TextBlockDefaultBold}"
  144. Text="{Binding Info.MemberPhone}" />
  145. </WrapPanel>
  146. <WrapPanel Margin="0,20,0,0">
  147. <TextBlock
  148. FontSize="18"
  149. Style="{StaticResource Title}"
  150. Text="身份证:" />
  151. <TextBlock
  152. FontSize="18"
  153. Foreground="Red"
  154. Style="{StaticResource TextBlockDefaultBold}"
  155. Text="{Binding Info.MemberCardId}" />
  156. </WrapPanel>
  157. </StackPanel>
  158. </Grid>
  159. <hc:Divider
  160. Content="卡信息"
  161. FontSize="16"
  162. FontWeight="Bold"
  163. Foreground="WhiteSmoke" />
  164. <StackPanel Margin="20,0,0,0">
  165. <WrapPanel>
  166. <TextBlock
  167. FontSize="18"
  168. Style="{StaticResource Title}"
  169. Text="卡号:" />
  170. <TextBlock
  171. FontSize="18"
  172. Foreground="Red"
  173. Style="{StaticResource TextBlockDefaultBold}"
  174. Text="{Binding Info.CardNum}" />
  175. </WrapPanel>
  176. <WrapPanel Margin="0,30,0,0">
  177. <TextBlock
  178. FontSize="18"
  179. Style="{StaticResource Title}"
  180. Text="卡状态:" />
  181. <TextBlock
  182. FontSize="18"
  183. Foreground="Red"
  184. Style="{StaticResource TextBlockDefaultBold}"
  185. Text="{Binding Info.Stutas}" />
  186. </WrapPanel>
  187. <WrapPanel Margin="0,30,0,0">
  188. <TextBlock
  189. FontSize="18"
  190. Style="{StaticResource Title}"
  191. Text="卡上余额:" />
  192. <TextBlock
  193. FontSize="18"
  194. Foreground="Red"
  195. Style="{StaticResource TextBlockDefaultBold}"
  196. Text="{Binding Info.Money}" />
  197. </WrapPanel>
  198. <WrapPanel Margin="0,30,0,0">
  199. <TextBlock
  200. FontSize="18"
  201. Style="{StaticResource Title}"
  202. Text="启用日期:" />
  203. <TextBlock
  204. FontSize="18"
  205. Foreground="Red"
  206. Style="{StaticResource TextBlockDefaultBold}"
  207. Text="{Binding Info.CreateAt, StringFormat={}{0:yyyy-MM-dd}}" />
  208. </WrapPanel>
  209. </StackPanel>
  210. </StackPanel>
  211. <hc:Divider
  212. Grid.Column="1"
  213. Height="{Binding ActualHeight, ElementName=Root}"
  214. Orientation="Vertical" />
  215. <StackPanel Grid.Column="2">
  216. <hc:Divider
  217. Content="充值金额"
  218. FontSize="16"
  219. FontWeight="Bold"
  220. Foreground="WhiteSmoke" />
  221. <TextBlock
  222. Margin="5,0,0,0"
  223. FontSize="18"
  224. Style="{StaticResource Title}">
  225. <Run Foreground="WhiteSmoke" Text="当前充值金额:" />
  226. <Run Foreground="Red" Text="{Binding ShowMoney}" />
  227. </TextBlock>
  228. <WrapPanel HorizontalAlignment="Center">
  229. <Button
  230. Command="{s:Action InputAction}"
  231. CommandParameter="50"
  232. Style="{StaticResource 充值}">
  233. <Button.Content>
  234. <StackPanel HorizontalAlignment="Center">
  235. <TextBlock HorizontalAlignment="Center" Text="¥50" />
  236. <TextBlock HorizontalAlignment="Center" Text="[F1]" />
  237. </StackPanel>
  238. </Button.Content>
  239. </Button>
  240. <Button
  241. Command="{s:Action InputAction}"
  242. CommandParameter="100"
  243. Style="{StaticResource 充值}">
  244. <Button.Content>
  245. <StackPanel HorizontalAlignment="Center">
  246. <TextBlock HorizontalAlignment="Center" Text="¥100" />
  247. <TextBlock HorizontalAlignment="Center" Text="[F2]" />
  248. </StackPanel>
  249. </Button.Content>
  250. </Button>
  251. <Button
  252. Command="{s:Action InputAction}"
  253. CommandParameter="200"
  254. Style="{StaticResource 充值}">
  255. <Button.Content>
  256. <StackPanel HorizontalAlignment="Center">
  257. <TextBlock HorizontalAlignment="Center" Text="¥200" />
  258. <TextBlock HorizontalAlignment="Center" Text="[F3]" />
  259. </StackPanel>
  260. </Button.Content>
  261. </Button>
  262. <Button
  263. Command="{s:Action InputAction}"
  264. CommandParameter="500"
  265. Style="{StaticResource 充值}">
  266. <Button.Content>
  267. <StackPanel HorizontalAlignment="Center">
  268. <TextBlock HorizontalAlignment="Center" Text="¥500" />
  269. <TextBlock HorizontalAlignment="Center" Text="[F4]" />
  270. </StackPanel>
  271. </Button.Content>
  272. </Button>
  273. </WrapPanel>
  274. <WrapPanel HorizontalAlignment="Center">
  275. <TextBox
  276. Width="330"
  277. Margin="5,10,0,10"
  278. HorizontalAlignment="Left"
  279. hc:InfoElement.Placeholder="请输入自定义金额"
  280. Style="{StaticResource TextBoxExtend}">
  281. <TextBox.Text>
  282. <Binding Path="InputMoney" UpdateSourceTrigger="PropertyChanged">
  283. <Binding.ValidationRules>
  284. <local:ValidataRule />
  285. </Binding.ValidationRules>
  286. </Binding>
  287. </TextBox.Text>
  288. </TextBox>
  289. </WrapPanel>
  290. <WrapPanel HorizontalAlignment="Center">
  291. <TextBox
  292. Width="330"
  293. Margin="5,0,0,10"
  294. HorizontalAlignment="Left"
  295. hc:InfoElement.Placeholder="手动录入卡号"
  296. Style="{StaticResource TextBoxExtend}"
  297. Text="{Binding CardNo}" />
  298. </WrapPanel>
  299. <hc:Divider
  300. Content="操作"
  301. FontSize="16"
  302. FontWeight="Bold"
  303. Foreground="WhiteSmoke" />
  304. <WrapPanel HorizontalAlignment="Center">
  305. <Button
  306. Command="{s:Action ReadAction}"
  307. Content="读卡[R]"
  308. IsDefault="True"
  309. Style="{StaticResource 操作}" />
  310. <Button
  311. Command="{s:Action SaveAction}"
  312. Content="确定[Enter]"
  313. IsDefault="True"
  314. Style="{StaticResource 操作}" />
  315. <Button
  316. Command="{s:Action LockSreenAction}"
  317. Content="锁屏[F5]"
  318. IsDefault="True"
  319. Style="{StaticResource 操作}" />
  320. </WrapPanel>
  321. </StackPanel>
  322. </Grid>
  323. </Grid>
  324. </Window>