终端一体化运控平台
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.
 
 
 

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