AlarmQuery.xaml 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. <UserControl x:Class="TeamAAS_VP.Views.Statistics.AlarmQuery"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:prism="http://prismlibrary.com/"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  7. xmlns:vm="clr-namespace:TeamAAS_VP.ViewModels.Statistics"
  8. xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
  9. xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
  10. xmlns:lex="http://wpflocalizeextension.codeplex.com"
  11. lex:LocalizeDictionary.DesignCulture="zh-CN"
  12. lex:ResxLocalizationProvider.DefaultAssembly="TeamAAS-VP"
  13. lex:ResxLocalizationProvider.DefaultDictionary="Lang"
  14. prism:ViewModelLocator.AutoWireViewModel="True"
  15. FontFamily="{DynamicResource DefaultFont}"
  16. mc:Ignorable="d"
  17. d:DataContext="{d:DesignInstance Type=vm:AlarmQueryViewModel}"
  18. d:Height="600"
  19. d:Width="1024"
  20. d:Background="White">
  21. <b:Interaction.Triggers>
  22. <b:EventTrigger EventName="Loaded">
  23. <b:InvokeCommandAction Command="{Binding LoadedCommand}" />
  24. </b:EventTrigger>
  25. </b:Interaction.Triggers>
  26. <Grid>
  27. <Grid>
  28. <Grid.RowDefinitions>
  29. <RowDefinition Height="auto" />
  30. <RowDefinition Height="*" />
  31. </Grid.RowDefinitions>
  32. <materialDesign:ColorZone Grid.Column="0"
  33. Padding="16"
  34. Mode="PrimaryLight">
  35. <Grid>
  36. <Grid.RowDefinitions>
  37. <RowDefinition Height="auto" />
  38. <RowDefinition Height="auto" />
  39. </Grid.RowDefinitions>
  40. <Grid.ColumnDefinitions>
  41. <ColumnDefinition Width="auto" />
  42. <ColumnDefinition Width="auto" />
  43. <ColumnDefinition Width="auto" />
  44. <ColumnDefinition Width="auto" />
  45. </Grid.ColumnDefinitions>
  46. <DatePicker Grid.Row="0"
  47. Grid.Column="0"
  48. Width="140"
  49. Margin="5"
  50. materialDesign:HintAssist.HelperText="{lex:Loc 起始日期}"
  51. materialDesign:HintAssist.Hint="{lex:Loc 选择起始日期}"
  52. Style="{StaticResource MaterialDesignOutlinedDatePicker}"
  53. SelectedDate="{Binding StartDate}" />
  54. <materialDesign:TimePicker Grid.Row="0"
  55. Grid.Column="1"
  56. Width="140"
  57. Margin="5"
  58. SelectedTime="{Binding StartTime}"
  59. materialDesign:HintAssist.HelperText="{lex:Loc 起始时间}"
  60. materialDesign:HintAssist.Hint="{lex:Loc 选择起始时间}"
  61. Is24Hours="false"
  62. Style="{StaticResource MaterialDesignOutlinedTimePicker}" />
  63. <Border Grid.ColumnSpan="2"
  64. BorderThickness="1"
  65. BorderBrush="Gray"
  66. Height="1"
  67. VerticalAlignment="Bottom" />
  68. <DatePicker Grid.Row="1"
  69. Grid.Column="0"
  70. Width="140"
  71. Margin="5"
  72. materialDesign:HintAssist.HelperText="{lex:Loc 结束日期}"
  73. materialDesign:HintAssist.Hint="{lex:Loc 选择结束日期}"
  74. Style="{StaticResource MaterialDesignOutlinedDatePicker}"
  75. SelectedDate="{Binding EndDate}" />
  76. <materialDesign:TimePicker Grid.Row="1"
  77. Grid.Column="1"
  78. Width="140"
  79. Margin="5"
  80. SelectedTime="{Binding EndTime}"
  81. materialDesign:HintAssist.HelperText="{lex:Loc 结束时间}"
  82. materialDesign:HintAssist.Hint="{lex:Loc 选择结束时间}"
  83. Is24Hours="false"
  84. Style="{StaticResource MaterialDesignOutlinedTimePicker}" />
  85. <Button Grid.Row="0"
  86. Grid.Column="2"
  87. Content="{lex:Loc 查询}"
  88. MinWidth="100"
  89. Margin="5"
  90. materialDesign:ButtonAssist.CornerRadius="10"
  91. Style="{StaticResource MaterialDesignRaisedButton}"
  92. Command="{Binding SearchCommand}" />
  93. <Button Grid.Row="1"
  94. Grid.Column="2"
  95. Content="{lex:Loc 保存}"
  96. MinWidth="100"
  97. Margin="5"
  98. materialDesign:ButtonAssist.CornerRadius="10"
  99. Style="{StaticResource MaterialDesignRaisedButton}"
  100. Command="{Binding SaveCommand}" />
  101. <TextBlock Grid.Row="1" Grid.Column="3" Text="{Binding DataTable.Rows.Count,StringFormat= Records Count:{0}}" VerticalAlignment="Bottom"/>
  102. </Grid>
  103. </materialDesign:ColorZone>
  104. <DataGrid Grid.Row="1"
  105. AutoGenerateColumns="True"
  106. CanUserAddRows="False"
  107. ColumnWidth="*"
  108. SelectionMode="Extended"
  109. ItemsSource="{Binding DataTable}"
  110. SelectionUnit="Cell" />
  111. </Grid>
  112. <Button Margin="16"
  113. HorizontalAlignment="Left"
  114. VerticalAlignment="Center"
  115. Command="{x:Static materialDesign:Transitioner.MovePreviousCommand}"
  116. Style="{StaticResource MaterialDesignFloatingActionMiniButton}">
  117. <materialDesign:PackIcon Kind="StepBackward" />
  118. </Button>
  119. </Grid>
  120. </UserControl>