终端一体化运控平台
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

HistoryChartView.xaml 16 KiB

3 miesięcy temu
2 miesięcy temu
3 miesięcy temu
3 miesięcy temu
3 miesięcy temu
3 miesięcy temu
3 miesięcy temu
3 miesięcy temu
3 miesięcy temu
3 miesięcy temu
3 miesięcy temu
3 miesięcy temu
2 miesięcy temu
3 miesięcy temu
2 miesięcy temu
3 miesięcy temu
2 miesięcy temu
3 miesięcy temu
3 miesięcy temu
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327
  1. <UserControl
  2. x:Class="BPASmartClient.Academy.View.HistoryChartView"
  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:local="clr-namespace:BPASmartClient.Academy.View"
  7. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  8. xmlns:oxy="http://oxyplot.org/wpf"
  9. xmlns:vm="clr-namespace:BPASmartClient.Academy.ViewModel"
  10. d:DesignHeight="900"
  11. d:DesignWidth="1440"
  12. mc:Ignorable="d">
  13. <UserControl.DataContext>
  14. <vm:HistoryChartViewModel />
  15. </UserControl.DataContext>
  16. <UserControl.Resources>
  17. <Style x:Key="setCheck" TargetType="{x:Type RadioButton}">
  18. <Setter Property="HorizontalContentAlignment" Value="Center" />
  19. <Setter Property="VerticalContentAlignment" Value="Center" />
  20. <Setter Property="HorizontalAlignment" Value="Center" />
  21. <Setter Property="VerticalAlignment" Value="Center" />
  22. <Setter Property="Background" Value="Transparent" />
  23. <Setter Property="Template">
  24. <Setter.Value>
  25. <ControlTemplate TargetType="{x:Type RadioButton}">
  26. <Border Background="Transparent" BorderThickness="0">
  27. <ContentControl
  28. x:Name="check"
  29. HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
  30. VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
  31. Content="{TemplateBinding Content}"
  32. Foreground="#777777" />
  33. </Border>
  34. <ControlTemplate.Triggers>
  35. <Trigger Property="IsMouseOver" Value="True">
  36. <Setter TargetName="check" Property="Foreground" Value="White" />
  37. </Trigger>
  38. <Trigger Property="IsPressed" Value="True">
  39. <Setter TargetName="check" Property="Foreground" Value="White" />
  40. </Trigger>
  41. </ControlTemplate.Triggers>
  42. </ControlTemplate>
  43. </Setter.Value>
  44. </Setter>
  45. </Style>
  46. </UserControl.Resources>
  47. <Grid>
  48. <Grid.RowDefinitions>
  49. <RowDefinition Height="50" />
  50. <RowDefinition />
  51. </Grid.RowDefinitions>
  52. <StackPanel
  53. Margin="0,0,60,0"
  54. HorizontalAlignment="Right"
  55. VerticalAlignment="Center"
  56. Orientation="Horizontal">
  57. <TextBlock
  58. VerticalAlignment="Center"
  59. FontSize="16"
  60. Foreground="DeepSkyBlue"
  61. Text="产品编号:" />
  62. <TextBox
  63. Width="200"
  64. Height="30"
  65. Margin="0,0,10,0"
  66. VerticalContentAlignment="Center"
  67. Background="Transparent"
  68. BorderBrush="DeepSkyBlue"
  69. CaretBrush="DeepSkyBlue"
  70. FontSize="16"
  71. Foreground="DeepSkyBlue"
  72. Style="{x:Null}"
  73. Text="{Binding ProductNum}" />
  74. <Button
  75. Width="120"
  76. Height="30"
  77. Command="{Binding FindProductCommand}"
  78. Content="查询编号"
  79. Style="{StaticResource ButtonStyle}" />
  80. <TextBlock
  81. Margin="30,0,0,0"
  82. VerticalAlignment="Center"
  83. FontSize="16"
  84. Foreground="DeepSkyBlue"
  85. Text="查询时间:" />
  86. <DatePicker
  87. Width="150"
  88. Margin="0,0,10,0"
  89. BorderBrush="DeepSkyBlue"
  90. FontSize="16"
  91. SelectedDate="{Binding SelectTime}"
  92. Style="{DynamicResource PickerStyle}" />
  93. <Button
  94. Width="120"
  95. Height="30"
  96. Command="{Binding Select}"
  97. Content="查询"
  98. Style="{StaticResource ButtonStyle}" />
  99. </StackPanel>
  100. <Grid Grid.Row="1">
  101. <Grid.ColumnDefinitions>
  102. <ColumnDefinition />
  103. <ColumnDefinition Width="1.7*"/>
  104. </Grid.ColumnDefinitions>
  105. <!--#region 表格-->
  106. <Grid
  107. Grid.Column="0"
  108. Margin="20,20,20,300"
  109. Background="Transparent">
  110. <Grid.RowDefinitions>
  111. <RowDefinition Height="50" />
  112. <RowDefinition />
  113. </Grid.RowDefinitions>
  114. <!--#region 标题-->
  115. <Grid Background="#ff0C255F">
  116. <Grid.ColumnDefinitions>
  117. <ColumnDefinition Width="50" />
  118. <ColumnDefinition Width="180" />
  119. <ColumnDefinition Width="120" />
  120. <ColumnDefinition Width="1*" />
  121. </Grid.ColumnDefinitions>
  122. <Border
  123. Grid.ColumnSpan="1"
  124. BorderBrush="#777777"
  125. BorderThickness="0.8" />
  126. <Border
  127. Grid.ColumnSpan="2"
  128. BorderBrush="#777777"
  129. BorderThickness="0,0.8,0.8,0.8" />
  130. <Border
  131. Grid.ColumnSpan="3"
  132. BorderBrush="#777777"
  133. BorderThickness="0,0.8,0.8,0.8" />
  134. <Border
  135. Grid.ColumnSpan="4"
  136. BorderBrush="#777777"
  137. BorderThickness="0,0.8,0.8,0.8" />
  138. <TextBlock
  139. HorizontalAlignment="Center"
  140. VerticalAlignment="Center"
  141. FontSize="16"
  142. Foreground="White"
  143. Text="序号" />
  144. <TextBlock
  145. Grid.Column="1"
  146. HorizontalAlignment="Center"
  147. VerticalAlignment="Center"
  148. FontSize="16"
  149. Foreground="White"
  150. Text="配方名称" />
  151. <TextBlock
  152. Grid.Column="2"
  153. HorizontalAlignment="Center"
  154. VerticalAlignment="Center"
  155. FontSize="16"
  156. Foreground="White"
  157. Text="创建时间" />
  158. <TextBlock
  159. Grid.Column="3"
  160. HorizontalAlignment="Center"
  161. VerticalAlignment="Center"
  162. FontSize="16"
  163. Foreground="White"
  164. Text="操作" />
  165. </Grid>
  166. <!--#endregion-->
  167. <!--#region 表格内容-->
  168. <ScrollViewer
  169. Grid.Row="1"
  170. HorizontalScrollBarVisibility="Hidden"
  171. VerticalScrollBarVisibility="Hidden">
  172. <ItemsControl ItemsSource="{Binding RecipeCharts}">
  173. <ItemsControl.ItemTemplate>
  174. <DataTemplate>
  175. <Grid>
  176. <Grid
  177. Height="30"
  178. Margin="0,1"
  179. Background="#163175">
  180. <Grid.ColumnDefinitions>
  181. <ColumnDefinition Width="50" />
  182. <ColumnDefinition Width="180" />
  183. <ColumnDefinition Width="120" />
  184. <ColumnDefinition Width="1*" />
  185. </Grid.ColumnDefinitions>
  186. <Border
  187. Grid.ColumnSpan="1"
  188. BorderBrush="#777777"
  189. BorderThickness="0.4" />
  190. <Border
  191. Grid.ColumnSpan="2"
  192. BorderBrush="#777777"
  193. BorderThickness="0,0.4,0.4,0.4" />
  194. <Border
  195. Grid.ColumnSpan="3"
  196. BorderBrush="#777777"
  197. BorderThickness="0,0.4,0.4,0.4" />
  198. <Border
  199. Grid.ColumnSpan="4"
  200. BorderBrush="#777777"
  201. BorderThickness="0,0.4,0.4,0.4" />
  202. <TextBlock
  203. x:Name="num"
  204. HorizontalAlignment="Center"
  205. VerticalAlignment="Center"
  206. FontSize="16"
  207. Foreground="White"
  208. Text="{Binding Num}" />
  209. <TextBlock
  210. Grid.Column="1"
  211. HorizontalAlignment="Center"
  212. VerticalAlignment="Center"
  213. FontSize="16"
  214. Foreground="White"
  215. Text="{Binding Name}" />
  216. <TextBlock
  217. Grid.Column="2"
  218. HorizontalAlignment="Center"
  219. VerticalAlignment="Center"
  220. FontSize="16"
  221. Foreground="White"
  222. Text="{Binding CreateTime, StringFormat={}{0:yyyy-MM-dd}}" />
  223. <RadioButton
  224. x:Name="ceshi"
  225. Grid.Column="3"
  226. Content="查看"
  227. FontSize="16"
  228. Foreground="White"
  229. GroupName="sss"
  230. Style="{StaticResource setCheck}" />
  231. </Grid>
  232. <Popup
  233. HorizontalAlignment="Center"
  234. VerticalAlignment="Center"
  235. AllowsTransparency="True"
  236. IsOpen="{Binding ElementName=ceshi, Path=IsChecked, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
  237. MouseLeave="Popup_MouseLeave"
  238. Placement="Bottom"
  239. PlacementTarget="{Binding ElementName=ceshi}">
  240. <Grid
  241. Width="200"
  242. Height="200"
  243. Background="Transparent">
  244. <Path
  245. Fill="#ff0C255F"
  246. Stroke="White"
  247. StrokeThickness="1">
  248. <Path.Data>
  249. <GeometryGroup>
  250. <PathGeometry>
  251. <PathFigure StartPoint="0,10">
  252. <LineSegment Point="0,200" />
  253. <LineSegment Point="200,200" />
  254. <LineSegment Point="200,10" />
  255. <LineSegment Point="60,10" />
  256. <LineSegment Point="50,0" />
  257. <LineSegment Point="40,10" />
  258. <LineSegment Point="0,10" />
  259. </PathFigure>
  260. </PathGeometry>
  261. </GeometryGroup>
  262. </Path.Data>
  263. </Path>
  264. <StackPanel
  265. Margin="0,30,0,20"
  266. HorizontalAlignment="Center"
  267. VerticalAlignment="Center"
  268. Orientation="Vertical">
  269. <Border Margin="0,10">
  270. <Button
  271. Width="100"
  272. Height="35"
  273. Click="Button_Click"
  274. CommandParameter="{Binding ElementName=num, Path=Text, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
  275. Content="温度曲线"
  276. Style="{StaticResource ButtonStyle}" />
  277. </Border>
  278. <Border Margin="0,10">
  279. <Button
  280. Width="100"
  281. Height="35"
  282. Click="Button_Click"
  283. CommandParameter="{Binding ElementName=num, Path=Text, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
  284. Content="转速曲线"
  285. Style="{StaticResource ButtonStyle}" />
  286. </Border>
  287. <Border Margin="0,10">
  288. <Button
  289. Width="100"
  290. Height="35"
  291. Click="Button_Click"
  292. CommandParameter="{Binding ElementName=num, Path=Text, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
  293. Content="重量曲线"
  294. Style="{StaticResource ButtonStyle}" />
  295. </Border>
  296. </StackPanel>
  297. </Grid>
  298. </Popup>
  299. </Grid>
  300. </DataTemplate>
  301. </ItemsControl.ItemTemplate>
  302. </ItemsControl>
  303. </ScrollViewer>
  304. <!--#endregion-->
  305. </Grid>
  306. <!--#endregion-->
  307. <!--#region 曲线-->
  308. <oxy:PlotView
  309. x:Name="chartView"
  310. Grid.Column="1"
  311. Margin="5"
  312. Background="White"
  313. Foreground="White"
  314. PanCursor="Hand" />
  315. <!--#endregion-->
  316. </Grid>
  317. </Grid>
  318. </UserControl>