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.

145 regels
6.6 KiB

  1. <hc:Window
  2. x:Class="HKCardOUT.Views.RootView"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:c="clr-namespace:CalcBinding;assembly=CalcBinding"
  6. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  7. xmlns:hc="https://handyorg.github.io/handycontrol"
  8. xmlns:helper="clr-namespace:HKCardOUT.Helper"
  9. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  10. xmlns:s="https://github.com/canton7/Stylet"
  11. xmlns:viewModels="clr-namespace:HKCardOUT.ViewModels"
  12. x:Name="Main"
  13. Title="海科智慧一卡通平台"
  14. d:DataContext="{d:DesignInstance Type=viewModels:RootViewModel}"
  15. ShowMaxButton="False"
  16. ShowMinButton="False"
  17. ShowTitle="True"
  18. Visibility="Hidden"
  19. WindowStartupLocation="CenterScreen"
  20. WindowState="Maximized"
  21. mc:Ignorable="d">
  22. <hc:Window.Resources>
  23. <helper:HKConverter x:Key="TOC" />
  24. <Style x:Key="SaleLogHeader" TargetType="DataGridColumnHeader">
  25. <Setter Property="FontSize" Value="18" />
  26. <Setter Property="Background" Value="Transparent" />
  27. <Setter Property="Foreground" Value="White" />
  28. <Setter Property="HorizontalAlignment" Value="Center" />
  29. <Setter Property="VerticalAlignment" Value="Center" />
  30. </Style>
  31. <Style x:Key="CenterAlignmentStyle" TargetType="TextBlock">
  32. <Setter Property="TextAlignment" Value="Center" />
  33. <Setter Property="VerticalAlignment" Value="Center" />
  34. <Setter Property="Foreground" Value="White" />
  35. <Setter Property="FontSize" Value="22" />
  36. <Setter Property="FontWeight" Value="Bold" />
  37. <Setter Property="Background" Value="Transparent" />
  38. </Style>
  39. </hc:Window.Resources>
  40. <hc:Window.Background>
  41. <ImageBrush ImageSource="/HKResouces/背景.jpg" />
  42. </hc:Window.Background>
  43. <Grid>
  44. <Grid.ColumnDefinitions>
  45. <ColumnDefinition />
  46. <ColumnDefinition Width="200" />
  47. </Grid.ColumnDefinitions>
  48. <DataGrid
  49. AutoGenerateColumns="False"
  50. Background="Transparent"
  51. IsReadOnly="True"
  52. ItemsSource="{Binding Result}"
  53. Style="{StaticResource DataGridBaseStyle}">
  54. <DataGrid.RowStyle>
  55. <Style BasedOn="{StaticResource DataGridRowStyle}" TargetType="DataGridRow">
  56. <Setter Property="Background" Value="Transparent" />
  57. <Style.Triggers>
  58. <Trigger Property="UIElement.IsMouseOver" Value="true">
  59. <Setter Property="Background" Value="Transparent" />
  60. </Trigger>
  61. </Style.Triggers>
  62. </Style>
  63. </DataGrid.RowStyle>
  64. <DataGrid.Columns>
  65. <DataGridTextColumn
  66. Width="300"
  67. Binding="{Binding CardNo}"
  68. ElementStyle="{StaticResource CenterAlignmentStyle}"
  69. Header="卡号"
  70. HeaderStyle="{StaticResource SaleLogHeader}" />
  71. <!--<DataGridTextColumn
  72. Width="200"
  73. Binding="{Binding Money}"
  74. ElementStyle="{StaticResource CenterAlignmentStyle}"
  75. Header="金额"
  76. HeaderStyle="{StaticResource SaleLogHeader}" />-->
  77. <DataGridTextColumn
  78. Width="200"
  79. Binding="{Binding Location}"
  80. ElementStyle="{StaticResource CenterAlignmentStyle}"
  81. Header="档口"
  82. HeaderStyle="{StaticResource SaleLogHeader}" />
  83. <DataGridTextColumn
  84. Width="200"
  85. Binding="{Binding Count}"
  86. ElementStyle="{StaticResource CenterAlignmentStyle}"
  87. Header="刷卡次数"
  88. HeaderStyle="{StaticResource SaleLogHeader}" />
  89. <!--<DataGridTextColumn
  90. Width="300"
  91. Binding="{Binding CreateTime, StringFormat={}{0:yyyy-MM-dd HH:mm:ss}, UpdateSourceTrigger=PropertyChanged}"
  92. ElementStyle="{StaticResource CenterAlignmentStyle}"
  93. Header="消费时间"
  94. HeaderStyle="{StaticResource SaleLogHeader}" />-->
  95. </DataGrid.Columns>
  96. </DataGrid>
  97. <ListBox
  98. Grid.Column="1"
  99. Background="Transparent"
  100. BorderThickness="0"
  101. ItemsSource="{Binding Ad}"
  102. Style="{StaticResource WrapPanelVerticalListBox}">
  103. <ListBox.ItemsPanel>
  104. <ItemsPanelTemplate>
  105. <WrapPanel HorizontalAlignment="Center" VerticalAlignment="Top" />
  106. </ItemsPanelTemplate>
  107. </ListBox.ItemsPanel>
  108. <ListBox.ItemTemplate>
  109. <DataTemplate>
  110. <Button
  111. Width="160"
  112. Height="80"
  113. Margin="20,20,0,0"
  114. Style="{StaticResource ButtonDefault}">
  115. <Button.Content>
  116. <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
  117. <TextBlock
  118. HorizontalAlignment="Center"
  119. VerticalAlignment="Center"
  120. FontSize="18"
  121. FontWeight="Bold"
  122. Text="{Binding Stalls, StringFormat=档口:{0}}" />
  123. <TextBlock
  124. HorizontalAlignment="Center"
  125. VerticalAlignment="Center"
  126. FontSize="18"
  127. FontWeight="Bold"
  128. Text="{Binding Device, StringFormat=设备:{0}}" />
  129. <!--<TextBlock
  130. HorizontalAlignment="Center"
  131. VerticalAlignment="Center"
  132. FontSize="18"
  133. FontWeight="Bold"
  134. Foreground="Red"
  135. Text="{Binding IsActive, Converter={StaticResource TOC}, StringFormat=广告:{0}}" />-->
  136. </StackPanel>
  137. </Button.Content>
  138. </Button>
  139. </DataTemplate>
  140. </ListBox.ItemTemplate>
  141. </ListBox>
  142. </Grid>
  143. </hc:Window>