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.

403 lines
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.2*" />
  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="1" Color="#C93ADA" />
  121. <GradientStop Offset="0" Color="#5844DD" />-->
  122. <GradientStop Offset="0" Color="#1FE6EC" />
  123. <GradientStop Offset="1" Color="#7850F1" />
  124. </LinearGradientBrush>
  125. </Border.Background>
  126. </Border>
  127. <TextBlock
  128. Grid.Row="1"
  129. HorizontalAlignment="Center"
  130. VerticalAlignment="Center"
  131. FontSize="50"
  132. Foreground="#ddd"
  133. Text="{Binding LAdInfo.Info.UserName}" />
  134. </Grid>
  135. <Grid Grid.Row="3" Margin="5">
  136. <Border Style="{StaticResource borderStyle}" />
  137. <ListBox
  138. Grid.Row="3"
  139. VerticalAlignment="Top"
  140. Background="Transparent"
  141. BorderThickness="0"
  142. ItemsSource="{Binding LAdInfo.AInfo}"
  143. Style="{StaticResource WrapPanelVerticalListBox}">
  144. <ListBox.ItemTemplate>
  145. <DataTemplate>
  146. <StackPanel Orientation="Horizontal">
  147. <TextBlock
  148. FontSize="25"
  149. Foreground="#DDD"
  150. Style="{StaticResource Lbl}"
  151. Text="{Binding Time}" />
  152. <TextBlock
  153. FontSize="25"
  154. Foreground="#DDD"
  155. Style="{StaticResource Lbl}"
  156. Text=" -- " />
  157. <TextBlock
  158. Grid.Column="1"
  159. Margin="5,0,0,0"
  160. FontSize="25"
  161. Foreground="#DDD"
  162. Style="{StaticResource Lbl}"
  163. Text="{Binding UserName}" />
  164. </StackPanel>
  165. </DataTemplate>
  166. </ListBox.ItemTemplate>
  167. </ListBox>
  168. </Grid>
  169. </Grid>
  170. <Grid x:Name="content" Grid.Column="1">
  171. <Grid.RowDefinitions>
  172. <RowDefinition Height=".239*" />
  173. <RowDefinition Height=".5*" />
  174. </Grid.RowDefinitions>
  175. <Grid>
  176. <Grid.RowDefinitions>
  177. <RowDefinition Height="60" />
  178. <RowDefinition />
  179. </Grid.RowDefinitions>
  180. <Grid Margin="5">
  181. <Grid.Background>
  182. <LinearGradientBrush StartPoint="0,0.5" EndPoint="1,0.5">
  183. <GradientStop Color="#3f4c5d" />
  184. <GradientStop Offset="1" Color="#3f4c5d" />
  185. <GradientStop Offset="0.5" Color="#8800BEFA" />
  186. </LinearGradientBrush>
  187. </Grid.Background>
  188. <TextBlock
  189. HorizontalAlignment="Center"
  190. FontSize="30"
  191. Foreground="#ddd"
  192. Style="{StaticResource Lbl}"
  193. Text="今日菜品" />
  194. </Grid>
  195. <ListBox
  196. Grid.Row="1"
  197. Background="Transparent"
  198. BorderThickness="0"
  199. ItemsSource="{Binding Foods, Mode=TwoWay}"
  200. Style="{StaticResource WrapPanelHorizontalListBox}">
  201. <ListBox.ItemsPanel>
  202. <ItemsPanelTemplate>
  203. <UniformGrid Columns="3" />
  204. </ItemsPanelTemplate>
  205. </ListBox.ItemsPanel>
  206. <ListBox.ItemTemplate>
  207. <DataTemplate>
  208. <Grid Height="135" Margin="5">
  209. <Border Margin="10,0" Style="{StaticResource borderStyle}">
  210. <Border.Background>
  211. <LinearGradientBrush StartPoint="1,0" EndPoint="0.5,1">
  212. <GradientStop Offset="0" Color="#1FE6EC" />
  213. <GradientStop Offset="1" Color="#7850F1" />
  214. </LinearGradientBrush>
  215. </Border.Background>
  216. </Border>
  217. <TextBlock
  218. VerticalAlignment="Center"
  219. FontSize="70"
  220. Foreground="#ddd"
  221. Style="{StaticResource Lbl}"
  222. Text="{Binding .}"
  223. TextAlignment="Center" />
  224. </Grid>
  225. </DataTemplate>
  226. </ListBox.ItemTemplate>
  227. </ListBox>
  228. </Grid>
  229. <view2:WebView2
  230. x:Name="view2"
  231. Grid.Row="1"
  232. Margin="5" />
  233. </Grid>
  234. <Grid Grid.Column="2">
  235. <Grid.RowDefinitions>
  236. <RowDefinition Height="60" />
  237. <RowDefinition Height="0.2*" />
  238. <RowDefinition Height="0.2*" />
  239. <RowDefinition />
  240. </Grid.RowDefinitions>
  241. <Grid Margin="5">
  242. <Grid.Background>
  243. <LinearGradientBrush StartPoint="0,0.5" EndPoint="1,0.5">
  244. <GradientStop Offset="0" Color="#FF3f4c5d" />
  245. <GradientStop Offset="1" Color="#FF3f4c5d" />
  246. <GradientStop Offset="0.5" Color="#8800BEFA" />
  247. </LinearGradientBrush>
  248. </Grid.Background>
  249. <TextBlock
  250. HorizontalAlignment="Center"
  251. Foreground="#ddd"
  252. Style="{StaticResource Lbl}"
  253. Text="{Binding RAdinfo.Gate}" />
  254. </Grid>
  255. <Grid Grid.Row="1" Margin="5">
  256. <Grid.RowDefinitions>
  257. <RowDefinition />
  258. <RowDefinition />
  259. </Grid.RowDefinitions>
  260. <Grid.ColumnDefinitions>
  261. <ColumnDefinition />
  262. <ColumnDefinition />
  263. </Grid.ColumnDefinitions>
  264. <Border
  265. Grid.RowSpan="2"
  266. Grid.ColumnSpan="2"
  267. Style="{StaticResource borderStyle}">
  268. <Border.Background>
  269. <LinearGradientBrush StartPoint="1,0" EndPoint="0.5,1">
  270. <GradientStop Offset="0" Color="#1FE6EC" />
  271. <GradientStop Offset="1" Color="#7850F1" />
  272. </LinearGradientBrush>
  273. </Border.Background>
  274. </Border>
  275. <TextBlock
  276. Grid.Row="1"
  277. HorizontalAlignment="Center"
  278. VerticalAlignment="Center"
  279. FontSize="22"
  280. Foreground="#ddd"
  281. Text="设备状态" />
  282. <TextBlock
  283. HorizontalAlignment="Center"
  284. VerticalAlignment="Center"
  285. FontSize="45"
  286. Foreground="{Binding RAdinfo.Msg, Converter={StaticResource TextForegroundConvert}}"
  287. Text="{Binding RAdinfo.Msg}" />
  288. <TextBlock
  289. Grid.Row="1"
  290. Grid.Column="1"
  291. HorizontalAlignment="Center"
  292. VerticalAlignment="Center"
  293. FontSize="22"
  294. Foreground="#ddd"
  295. Text="今日刷卡量" />
  296. <TextBlock
  297. Grid.Column="1"
  298. HorizontalAlignment="Center"
  299. VerticalAlignment="Center"
  300. FontSize="60"
  301. Foreground="#ddd"
  302. Text="{Binding RAdinfo.Count}" />
  303. </Grid>
  304. <Grid Grid.Row="2" Margin="5">
  305. <Border Style="{StaticResource borderStyle}">
  306. <Border.Background>
  307. <LinearGradientBrush StartPoint="1,0" EndPoint="0.5,1">
  308. <!--<GradientStop Offset="1" Color="#C93ADA" />
  309. <GradientStop Offset="0" Color="#5844DD" />-->
  310. <GradientStop Offset="0" Color="#1FE6EC" />
  311. <GradientStop Offset="1" Color="#7850F1" />
  312. </LinearGradientBrush>
  313. </Border.Background>
  314. </Border>
  315. <TextBlock
  316. Grid.Row="1"
  317. HorizontalAlignment="Center"
  318. VerticalAlignment="Center"
  319. FontSize="50"
  320. Foreground="#ddd"
  321. Text="{Binding RAdinfo.Info.UserName}" />
  322. </Grid>
  323. <Grid Grid.Row="3" Margin="5">
  324. <Border Style="{StaticResource borderStyle}" />
  325. <ListBox
  326. Grid.Row="3"
  327. VerticalAlignment="Top"
  328. Background="Transparent"
  329. BorderThickness="0"
  330. ItemsSource="{Binding RAdinfo.AInfo}"
  331. Style="{StaticResource WrapPanelVerticalListBox}">
  332. <ListBox.ItemTemplate>
  333. <DataTemplate>
  334. <StackPanel Orientation="Horizontal">
  335. <TextBlock
  336. FontSize="25"
  337. Foreground="#DDD"
  338. Style="{StaticResource Lbl}"
  339. Text="{Binding Time}" />
  340. <TextBlock
  341. FontSize="25"
  342. Foreground="#DDD"
  343. Style="{StaticResource Lbl}"
  344. Text=" -- " />
  345. <TextBlock
  346. Grid.Column="1"
  347. Margin="5,0,0,0"
  348. FontSize="25"
  349. Foreground="#DDD"
  350. Style="{StaticResource Lbl}"
  351. Text="{Binding UserName}" />
  352. </StackPanel>
  353. </DataTemplate>
  354. </ListBox.ItemTemplate>
  355. </ListBox>
  356. </Grid>
  357. </Grid>
  358. </Grid>
  359. </Window>