终端一体化运控平台
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 

327 lignes
14 KiB

  1. <UserControl
  2. x:Class="BPASmartClient.Academy.View.DeviceChart50LView"
  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:lvc="clr-namespace:LiveCharts.Wpf;assembly=LiveCharts.Wpf"
  8. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  9. xmlns:oxy="http://oxyplot.org/wpf"
  10. xmlns:vm="clr-namespace:BPASmartClient.Academy.ViewModel"
  11. d:DesignHeight="450"
  12. d:DesignWidth="800"
  13. mc:Ignorable="d">
  14. <UserControl.DataContext>
  15. <vm:DeviceChart50LViewModel />
  16. </UserControl.DataContext>
  17. <Grid>
  18. <UniformGrid
  19. x:Name="ooo"
  20. Grid.Row="1"
  21. Columns="2"
  22. Rows="2">
  23. <StackPanel Orientation="Vertical">
  24. <lvc:CartesianChart
  25. x:Name="ppp"
  26. Height="270"
  27. HorizontalAlignment="Stretch"
  28. VerticalAlignment="Top"
  29. AnimationsSpeed="0:0:1"
  30. DataTooltip="{x:Null}"
  31. Hoverable="False"
  32. MouseDoubleClick="DataView_CLick"
  33. ToolTip="温度曲线">
  34. <lvc:CartesianChart.Series>
  35. <lvc:LineSeries
  36. Fill="Transparent"
  37. LineSmoothness="1"
  38. PointGeometry="{x:Null}"
  39. Stroke="Red"
  40. StrokeThickness="2"
  41. Values="{Binding DataFeedback.CondensateWaterHumidity}" />
  42. <lvc:LineSeries
  43. Fill="Transparent"
  44. LineSmoothness="1"
  45. PointGeometry="{x:Null}"
  46. Stroke="Blue"
  47. StrokeThickness="2"
  48. Values="{Binding DataFeedback.TempMaterial}" />
  49. <lvc:LineSeries
  50. Fill="Transparent"
  51. LineSmoothness="1"
  52. PointGeometry="{x:Null}"
  53. Stroke="Green"
  54. StrokeThickness="2"
  55. Values="{Binding DataFeedback.TempVent}" />
  56. </lvc:CartesianChart.Series>
  57. <lvc:CartesianChart.AxisY>
  58. <lvc:Axis>
  59. <lvc:Axis.Separator>
  60. <lvc:Separator IsEnabled="False" />
  61. </lvc:Axis.Separator>
  62. </lvc:Axis>
  63. </lvc:CartesianChart.AxisY>
  64. <lvc:CartesianChart.AxisX>
  65. <lvc:Axis LabelFormatter="{Binding DateTimeFormatter}" Unit="{Binding AxisUnit}">
  66. <lvc:Axis.Separator>
  67. <lvc:Separator IsEnabled="False" Step="{Binding AxisStep}" />
  68. </lvc:Axis.Separator>
  69. </lvc:Axis>
  70. </lvc:CartesianChart.AxisX>
  71. </lvc:CartesianChart>
  72. <StackPanel Margin="0,10,0,0" Orientation="Horizontal">
  73. <TextBlock Foreground="White" Text="温度曲线/℃" />
  74. <Rectangle
  75. Width="20"
  76. Height="2"
  77. Margin="10,0,0,2"
  78. Fill="Blue" />
  79. <TextBlock Foreground="White" Text="物料罐温度" />
  80. <Rectangle
  81. Width="20"
  82. Height="2"
  83. Margin="10,0,0,2"
  84. Fill="Red" />
  85. <TextBlock Foreground="White" Text="反应釜温度" />
  86. <Rectangle
  87. Width="20"
  88. Height="2"
  89. Margin="10,0,0,2"
  90. Fill="Green" />
  91. <TextBlock Foreground="White" Text="排气温度" />
  92. </StackPanel>
  93. </StackPanel>
  94. <StackPanel Margin="20,0,0,0" Orientation="Vertical">
  95. <lvc:CartesianChart
  96. Height="270"
  97. HorizontalAlignment="Stretch"
  98. VerticalAlignment="Top"
  99. AnimationsSpeed="0:0:1"
  100. DataTooltip="{x:Null}"
  101. Hoverable="False"
  102. MouseDoubleClick="DataView_CLick"
  103. ToolTip="转速曲线">
  104. <lvc:CartesianChart.Series>
  105. <lvc:LineSeries
  106. Fill="Transparent"
  107. LineSmoothness="1"
  108. PointGeometry="{x:Null}"
  109. Stroke="#F44F15"
  110. StrokeThickness="2"
  111. Values="{Binding DataFeedback.M101_Speed}" />
  112. <lvc:LineSeries
  113. Fill="Transparent"
  114. LineSmoothness="1"
  115. PointGeometry="{x:Null}"
  116. Stroke="#423FFD"
  117. StrokeThickness="2"
  118. Values="{Binding DataFeedback.M102_Speed}" />
  119. </lvc:CartesianChart.Series>
  120. <lvc:CartesianChart.AxisY>
  121. <lvc:Axis>
  122. <lvc:Axis.Separator>
  123. <lvc:Separator IsEnabled="False" />
  124. </lvc:Axis.Separator>
  125. </lvc:Axis>
  126. </lvc:CartesianChart.AxisY>
  127. <lvc:CartesianChart.AxisX>
  128. <lvc:Axis LabelFormatter="{Binding DateTimeFormatter}" Unit="{Binding AxisUnit}">
  129. <lvc:Axis.Separator>
  130. <lvc:Separator IsEnabled="False" Step="{Binding AxisStep}" />
  131. </lvc:Axis.Separator>
  132. </lvc:Axis>
  133. </lvc:CartesianChart.AxisX>
  134. </lvc:CartesianChart>
  135. <StackPanel Margin="0,10,0,0" Orientation="Horizontal">
  136. <TextBlock Foreground="White" Text="转速曲线/rpm" />
  137. <Rectangle
  138. Width="20"
  139. Height="2"
  140. Margin="10,0,0,2"
  141. Fill="#423FFD" />
  142. <TextBlock Foreground="White" Text="物料罐转速" />
  143. <Rectangle
  144. Width="20"
  145. Height="2"
  146. Margin="10,0,0,2"
  147. Fill="#F44F15" />
  148. <TextBlock Foreground="White" Text="反应釜转速" />
  149. </StackPanel>
  150. </StackPanel>
  151. <!--<StackPanel Orientation="Vertical">
  152. <lvc:CartesianChart
  153. Height="270"
  154. HorizontalAlignment="Stretch"
  155. VerticalAlignment="Top"
  156. AnimationsSpeed="0:0:1"
  157. DataTooltip="{x:Null}"
  158. Hoverable="False"
  159. MouseDoubleClick="DataView_CLick"
  160. ToolTip="比例阀开度曲线">
  161. <lvc:CartesianChart.Series>
  162. <lvc:LineSeries
  163. Fill="Transparent"
  164. LineSmoothness="1"
  165. PointGeometry="{x:Null}"
  166. Stroke="White"
  167. StrokeThickness="2"
  168. Values="{Binding DataFeedback.OpenValve}" />
  169. </lvc:CartesianChart.Series>
  170. <lvc:CartesianChart.AxisY>
  171. <lvc:Axis>
  172. <lvc:Axis.Separator>
  173. <lvc:Separator IsEnabled="False" />
  174. </lvc:Axis.Separator>
  175. </lvc:Axis>
  176. </lvc:CartesianChart.AxisY>
  177. <lvc:CartesianChart.AxisX>
  178. <lvc:Axis
  179. LabelFormatter="{Binding DateTimeFormatter}"
  180. Unit="{Binding AxisUnit}">
  181. <lvc:Axis.Separator>
  182. <lvc:Separator IsEnabled="False" Step="{Binding AxisStep}" />
  183. </lvc:Axis.Separator>
  184. </lvc:Axis>
  185. </lvc:CartesianChart.AxisX>
  186. </lvc:CartesianChart>
  187. <StackPanel Margin="0,10,0,0" Orientation="Horizontal">
  188. <TextBlock Foreground="White" Text="比例阀开度曲线" />
  189. <Rectangle
  190. Width="20"
  191. Height="2"
  192. Margin="20,0,0,2"
  193. Fill="White" />
  194. <TextBlock Foreground="White" Text="比例阀开度" />
  195. </StackPanel>
  196. </StackPanel>-->
  197. <!--<StackPanel Orientation="Vertical">
  198. <lvc:CartesianChart
  199. Height="270"
  200. HorizontalAlignment="Stretch"
  201. VerticalAlignment="Top"
  202. AnimationsSpeed="0:0:1"
  203. DataTooltip="{x:Null}"
  204. Hoverable="False"
  205. MouseDoubleClick="DataView_CLick"
  206. ToolTip="压力曲线">
  207. <lvc:CartesianChart.Series>
  208. <lvc:LineSeries
  209. Fill="Transparent"
  210. LineSmoothness="1"
  211. PointGeometry="{x:Null}"
  212. Stroke="#F1C74B"
  213. StrokeThickness="2"
  214. Values="{Binding DataFeedback.PressureWok}" />
  215. </lvc:CartesianChart.Series>
  216. <lvc:CartesianChart.AxisY>
  217. <lvc:Axis
  218. LabelFormatter="{Binding doubleFormatter}"
  219. MaxValue="1.0"
  220. MinValue="0">
  221. <lvc:Axis.Separator>
  222. <lvc:Separator IsEnabled="False" />
  223. </lvc:Axis.Separator>
  224. </lvc:Axis>
  225. </lvc:CartesianChart.AxisY>
  226. <lvc:CartesianChart.AxisX>
  227. <lvc:Axis
  228. LabelFormatter="{Binding DateTimeFormatter}"
  229. Unit="{Binding AxisUnit}">
  230. <lvc:Axis.Separator>
  231. <lvc:Separator IsEnabled="False" Step="{Binding AxisStep}" />
  232. </lvc:Axis.Separator>
  233. </lvc:Axis>
  234. </lvc:CartesianChart.AxisX>
  235. </lvc:CartesianChart>
  236. <StackPanel Margin="0,10,0,0" Orientation="Horizontal">
  237. <TextBlock Foreground="White" Text="压力曲线/Mpa" />
  238. <Rectangle
  239. Width="20"
  240. Height="2"
  241. Margin="20,0,0,2"
  242. Fill="#F1C74B" />
  243. <TextBlock Foreground="White" Text="反应釜压力" />
  244. </StackPanel>
  245. </StackPanel>-->
  246. <StackPanel Margin="0,20,0,0" Orientation="Vertical">
  247. <lvc:CartesianChart
  248. Height="270"
  249. HorizontalAlignment="Stretch"
  250. VerticalAlignment="Top"
  251. AnimationsSpeed="0:0:1"
  252. DataTooltip="{x:Null}"
  253. Hoverable="False"
  254. MouseDoubleClick="DataView_CLick"
  255. ToolTip="重量曲线">
  256. <lvc:CartesianChart.Series>
  257. <lvc:LineSeries
  258. Fill="Transparent"
  259. LineSmoothness="1"
  260. PointGeometry="{x:Null}"
  261. Stroke="Purple"
  262. StrokeThickness="2"
  263. Values="{Binding DataFeedback.WeightWok}" />
  264. </lvc:CartesianChart.Series>
  265. <lvc:CartesianChart.AxisY>
  266. <lvc:Axis>
  267. <lvc:Axis.Separator>
  268. <lvc:Separator IsEnabled="False" />
  269. </lvc:Axis.Separator>
  270. </lvc:Axis>
  271. </lvc:CartesianChart.AxisY>
  272. <lvc:CartesianChart.AxisX>
  273. <lvc:Axis LabelFormatter="{Binding DateTimeFormatter}" Unit="{Binding AxisUnit}">
  274. <lvc:Axis.Separator>
  275. <lvc:Separator IsEnabled="False" Step="{Binding AxisStep}" />
  276. </lvc:Axis.Separator>
  277. </lvc:Axis>
  278. </lvc:CartesianChart.AxisX>
  279. </lvc:CartesianChart>
  280. <StackPanel Margin="0,10,0,0" Orientation="Horizontal">
  281. <TextBlock Foreground="White" Text="重量曲线/kg" />
  282. <Rectangle
  283. Width="20"
  284. Height="2"
  285. Margin="20,0,0,2"
  286. Fill="Purple" />
  287. <TextBlock Foreground="White" Text="冷却水罐重量" />
  288. </StackPanel>
  289. </StackPanel>
  290. </UniformGrid>
  291. <Grid
  292. x:Name="chartGrid"
  293. HorizontalAlignment="Stretch"
  294. VerticalAlignment="Stretch"
  295. Background="White"
  296. Visibility="Collapsed">
  297. <Grid.ColumnDefinitions>
  298. <ColumnDefinition />
  299. <ColumnDefinition Width="200" />
  300. </Grid.ColumnDefinitions>
  301. <oxy:PlotView
  302. x:Name="chartView"
  303. Margin="5"
  304. Background="Transparent"
  305. Foreground="Black"
  306. PanCursor="Hand" />
  307. <Button
  308. Grid.Column="1"
  309. Width="120"
  310. Height=" 40"
  311. HorizontalAlignment="Center"
  312. VerticalAlignment="Center"
  313. Click="Button_Click"
  314. Content="退出" />
  315. </Grid>
  316. </Grid>
  317. </UserControl>