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

401 行
16 KiB

  1. <Window
  2. x:Class="HKCardOUT.Views.AdWindow"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:con="clr-namespace:Converter"
  6. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  7. xmlns:hc="https://handyorg.github.io/handycontrol"
  8. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  9. xmlns:view2="clr-namespace:Microsoft.Web.WebView2.Wpf;assembly=Microsoft.Web.WebView2.Wpf"
  10. xmlns:viewModels="clr-namespace:HKCardOUT.ViewModels"
  11. Width="1920"
  12. Height="1080"
  13. d:DataContext="{d:DesignInstance Type=viewModels:AdWindowViewModel}"
  14. Background="#3f4c5d"
  15. WindowStyle="None"
  16. mc:Ignorable="d">
  17. <Window.Resources>
  18. <con:TextForegroundConvert x:Key="TextForegroundConvert" />
  19. <Style x:Key="Lbl" TargetType="TextBlock">
  20. <Setter Property="FontSize" Value="26" />
  21. <Setter Property="Margin" Value="0,5,0,10" />
  22. <!--<Setter Property="FontWeight" Value="Bold" />-->
  23. <Setter Property="Foreground" Value="SkyBlue" />
  24. </Style>
  25. <Style x:Key="borderStyle" TargetType="Border">
  26. <Setter Property="Background" Value="#AA00BEFA" />
  27. <Setter Property="CornerRadius" Value="10" />
  28. <Setter Property="Effect">
  29. <Setter.Value>
  30. <DropShadowEffect
  31. BlurRadius="10"
  32. Direction="270"
  33. Opacity="0.4"
  34. ShadowDepth="5"
  35. Color="White" />
  36. </Setter.Value>
  37. </Setter>
  38. </Style>
  39. </Window.Resources>
  40. <Grid x:Name="alls">
  41. <Grid.ColumnDefinitions>
  42. <ColumnDefinition Width=".2*" />
  43. <ColumnDefinition Width="*" />
  44. <ColumnDefinition Width=".2*" />
  45. </Grid.ColumnDefinitions>
  46. <Grid x:Name="area1">
  47. <Grid.RowDefinitions>
  48. <RowDefinition Height="60" />
  49. <RowDefinition Height="0.55*" />
  50. <RowDefinition Height="0.2*" />
  51. <RowDefinition />
  52. </Grid.RowDefinitions>
  53. <Grid Margin="5">
  54. <Grid.Background>
  55. <LinearGradientBrush StartPoint="0,0.5" EndPoint="1,0.5">
  56. <GradientStop Color="#3f4c5d" />
  57. <GradientStop Offset="1" Color="#3f4c5d" />
  58. <GradientStop Offset="0.5" Color="#8800BEFA" />
  59. </LinearGradientBrush>
  60. </Grid.Background>
  61. <TextBlock
  62. HorizontalAlignment="Center"
  63. Foreground="#ddd"
  64. Style="{StaticResource Lbl}"
  65. Text="{Binding LAdInfo.Gate}" />
  66. </Grid>
  67. <Grid Grid.Row="1" Margin="5">
  68. <Grid.RowDefinitions>
  69. <RowDefinition />
  70. <RowDefinition />
  71. </Grid.RowDefinitions>
  72. <Grid.ColumnDefinitions>
  73. <ColumnDefinition />
  74. <ColumnDefinition />
  75. </Grid.ColumnDefinitions>
  76. <Border
  77. Grid.RowSpan="2"
  78. Grid.ColumnSpan="2"
  79. Style="{StaticResource borderStyle}">
  80. <Border.Background>
  81. <LinearGradientBrush StartPoint="1,0" EndPoint="0.5,1">
  82. <GradientStop Offset="0" Color="#1FE6EC" />
  83. <GradientStop Offset="1" Color="#7850F1" />
  84. </LinearGradientBrush>
  85. </Border.Background>
  86. </Border>
  87. <TextBlock
  88. Grid.Row="1"
  89. HorizontalAlignment="Center"
  90. VerticalAlignment="Center"
  91. FontSize="22"
  92. Foreground="#ddd"
  93. Text="设备状态" />
  94. <TextBlock
  95. HorizontalAlignment="Center"
  96. VerticalAlignment="Center"
  97. FontSize="45"
  98. Foreground="{Binding LAdInfo.Msg, Converter={StaticResource TextForegroundConvert}}"
  99. Text="{Binding LAdInfo.Msg}" />
  100. <TextBlock
  101. Grid.Row="1"
  102. Grid.Column="1"
  103. HorizontalAlignment="Center"
  104. VerticalAlignment="Center"
  105. FontSize="22"
  106. Foreground="#ddd"
  107. Text="今日刷卡量" />
  108. <TextBlock
  109. Grid.Column="1"
  110. HorizontalAlignment="Center"
  111. VerticalAlignment="Center"
  112. FontSize="60"
  113. Foreground="#ddd"
  114. Text="{Binding LAdInfo.Count}" />
  115. </Grid>
  116. <Grid Grid.Row="2" Margin="5">
  117. <Border Style="{StaticResource borderStyle}">
  118. <Border.Background>
  119. <LinearGradientBrush StartPoint="1,0" EndPoint="0.5,1">
  120. <GradientStop Offset="0" Color="#1FE6EC" />
  121. <GradientStop Offset="1" Color="#7850F1" />
  122. </LinearGradientBrush>
  123. </Border.Background>
  124. </Border>
  125. <TextBlock
  126. Grid.Row="1"
  127. HorizontalAlignment="Center"
  128. VerticalAlignment="Center"
  129. FontSize="50"
  130. Foreground="#ddd"
  131. Text="{Binding LAdInfo.Info.UserName}" />
  132. </Grid>
  133. <Grid Grid.Row="3" Margin="5">
  134. <Border Style="{StaticResource borderStyle}" />
  135. <ListBox
  136. Grid.Row="3"
  137. VerticalAlignment="Top"
  138. Background="Transparent"
  139. BorderThickness="0"
  140. ItemsSource="{Binding LAdInfo.AInfo}"
  141. Style="{StaticResource WrapPanelVerticalListBox}">
  142. <ListBox.ItemTemplate>
  143. <DataTemplate>
  144. <StackPanel Orientation="Horizontal">
  145. <TextBlock
  146. FontSize="25"
  147. Foreground="#DDD"
  148. Style="{StaticResource Lbl}"
  149. Text="{Binding Time}" />
  150. <TextBlock
  151. FontSize="25"
  152. Foreground="#DDD"
  153. Style="{StaticResource Lbl}"
  154. Text=" -- " />
  155. <TextBlock
  156. Grid.Column="1"
  157. Margin="5,0,0,0"
  158. FontSize="25"
  159. Foreground="#DDD"
  160. Style="{StaticResource Lbl}"
  161. Text="{Binding UserName}" />
  162. </StackPanel>
  163. </DataTemplate>
  164. </ListBox.ItemTemplate>
  165. </ListBox>
  166. </Grid>
  167. </Grid>
  168. <Grid x:Name="content" Grid.Column="1">
  169. <Grid.RowDefinitions>
  170. <RowDefinition Height=".239*" />
  171. <RowDefinition Height=".5*" />
  172. </Grid.RowDefinitions>
  173. <Grid>
  174. <Grid.RowDefinitions>
  175. <RowDefinition Height="60" />
  176. <RowDefinition />
  177. </Grid.RowDefinitions>
  178. <Grid Margin="5">
  179. <Grid.Background>
  180. <LinearGradientBrush StartPoint="0,0.5" EndPoint="1,0.5">
  181. <GradientStop Color="#3f4c5d" />
  182. <GradientStop Offset="1" Color="#3f4c5d" />
  183. <GradientStop Offset="0.5" Color="#8800BEFA" />
  184. </LinearGradientBrush>
  185. </Grid.Background>
  186. <TextBlock
  187. HorizontalAlignment="Center"
  188. FontSize="30"
  189. Foreground="#ddd"
  190. Style="{StaticResource Lbl}"
  191. Text="今日菜品" />
  192. </Grid>
  193. <ListBox
  194. Grid.Row="1"
  195. Background="Transparent"
  196. BorderThickness="0"
  197. ItemsSource="{Binding Foods, Mode=TwoWay}"
  198. Style="{StaticResource WrapPanelHorizontalListBox}">
  199. <ListBox.ItemsPanel>
  200. <ItemsPanelTemplate>
  201. <UniformGrid Columns="3" />
  202. </ItemsPanelTemplate>
  203. </ListBox.ItemsPanel>
  204. <ListBox.ItemTemplate>
  205. <DataTemplate>
  206. <Grid Height="135" Margin="5">
  207. <Border Margin="10,0" Style="{StaticResource borderStyle}">
  208. <Border.Background>
  209. <LinearGradientBrush StartPoint="1,0" EndPoint="0.5,1">
  210. <GradientStop Offset="0" Color="#1FE6EC" />
  211. <GradientStop Offset="1" Color="#7850F1" />
  212. </LinearGradientBrush>
  213. </Border.Background>
  214. </Border>
  215. <TextBlock
  216. VerticalAlignment="Center"
  217. FontSize="70"
  218. Foreground="#ddd"
  219. Style="{StaticResource Lbl}"
  220. Text="{Binding .}"
  221. TextAlignment="Center" />
  222. </Grid>
  223. </DataTemplate>
  224. </ListBox.ItemTemplate>
  225. </ListBox>
  226. </Grid>
  227. <view2:WebView2
  228. x:Name="view2"
  229. Grid.Row="1"
  230. Margin="5" />
  231. </Grid>
  232. <Grid Grid.Column="2">
  233. <Grid.RowDefinitions>
  234. <RowDefinition Height="60" />
  235. <RowDefinition Height="0.55*" />
  236. <RowDefinition Height="0.2*" />
  237. <RowDefinition />
  238. </Grid.RowDefinitions>
  239. <Grid Margin="5">
  240. <Grid.Background>
  241. <LinearGradientBrush StartPoint="0,0.5" EndPoint="1,0.5">
  242. <GradientStop Offset="0" Color="#FF3f4c5d" />
  243. <GradientStop Offset="1" Color="#FF3f4c5d" />
  244. <GradientStop Offset="0.5" Color="#8800BEFA" />
  245. </LinearGradientBrush>
  246. </Grid.Background>
  247. <TextBlock
  248. HorizontalAlignment="Center"
  249. Foreground="#ddd"
  250. Style="{StaticResource Lbl}"
  251. Text="{Binding RAdinfo.Gate}" />
  252. </Grid>
  253. <Grid Grid.Row="1" Margin="5">
  254. <Grid.RowDefinitions>
  255. <RowDefinition />
  256. <RowDefinition />
  257. </Grid.RowDefinitions>
  258. <Grid.ColumnDefinitions>
  259. <ColumnDefinition />
  260. <ColumnDefinition />
  261. </Grid.ColumnDefinitions>
  262. <Border
  263. Grid.RowSpan="2"
  264. Grid.ColumnSpan="2"
  265. Style="{StaticResource borderStyle}">
  266. <Border.Background>
  267. <LinearGradientBrush StartPoint="1,0" EndPoint="0.5,1">
  268. <GradientStop Offset="0" Color="#1FE6EC" />
  269. <GradientStop Offset="1" Color="#7850F1" />
  270. </LinearGradientBrush>
  271. </Border.Background>
  272. </Border>
  273. <TextBlock
  274. Grid.Row="1"
  275. HorizontalAlignment="Center"
  276. VerticalAlignment="Center"
  277. FontSize="22"
  278. Foreground="#ddd"
  279. Text="设备状态" />
  280. <TextBlock
  281. HorizontalAlignment="Center"
  282. VerticalAlignment="Center"
  283. FontSize="45"
  284. Foreground="{Binding RAdinfo.Msg, Converter={StaticResource TextForegroundConvert}}"
  285. Text="{Binding RAdinfo.Msg}" />
  286. <TextBlock
  287. Grid.Row="1"
  288. Grid.Column="1"
  289. HorizontalAlignment="Center"
  290. VerticalAlignment="Center"
  291. FontSize="22"
  292. Foreground="#ddd"
  293. Text="今日刷卡量" />
  294. <TextBlock
  295. Grid.Column="1"
  296. HorizontalAlignment="Center"
  297. VerticalAlignment="Center"
  298. FontSize="60"
  299. Foreground="#ddd"
  300. Text="{Binding RAdinfo.Count}" />
  301. </Grid>
  302. <Grid Grid.Row="2" Margin="5">
  303. <Border Style="{StaticResource borderStyle}">
  304. <Border.Background>
  305. <LinearGradientBrush StartPoint="1,0" EndPoint="0.5,1">
  306. <!--<GradientStop Offset="1" Color="#C93ADA" />
  307. <GradientStop Offset="0" Color="#5844DD" />-->
  308. <GradientStop Offset="0" Color="#1FE6EC" />
  309. <GradientStop Offset="1" Color="#7850F1" />
  310. </LinearGradientBrush>
  311. </Border.Background>
  312. </Border>
  313. <TextBlock
  314. Grid.Row="1"
  315. HorizontalAlignment="Center"
  316. VerticalAlignment="Center"
  317. FontSize="50"
  318. Foreground="#ddd"
  319. Text="{Binding RAdinfo.Info.UserName}" />
  320. </Grid>
  321. <Grid Grid.Row="3" Margin="5">
  322. <Border Style="{StaticResource borderStyle}" />
  323. <ListBox
  324. Grid.Row="3"
  325. VerticalAlignment="Top"
  326. Background="Transparent"
  327. BorderThickness="0"
  328. ItemsSource="{Binding RAdinfo.AInfo}"
  329. Style="{StaticResource WrapPanelVerticalListBox}">
  330. <ListBox.ItemTemplate>
  331. <DataTemplate>
  332. <StackPanel Orientation="Horizontal">
  333. <TextBlock
  334. FontSize="25"
  335. Foreground="#DDD"
  336. Style="{StaticResource Lbl}"
  337. Text="{Binding Time}" />
  338. <TextBlock
  339. FontSize="25"
  340. Foreground="#DDD"
  341. Style="{StaticResource Lbl}"
  342. Text=" -- " />
  343. <TextBlock
  344. Grid.Column="1"
  345. Margin="5,0,0,0"
  346. FontSize="25"
  347. Foreground="#DDD"
  348. Style="{StaticResource Lbl}"
  349. Text="{Binding UserName}" />
  350. </StackPanel>
  351. </DataTemplate>
  352. </ListBox.ItemTemplate>
  353. </ListBox>
  354. </Grid>
  355. </Grid>
  356. </Grid>
  357. </Window>