终端一体化运控平台
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 
 

337 satır
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="200" MinValue="0">
  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="#F44F15" StrokeThickness="2"
  72. Values="{Binding DataFeedback.SteamPressure}" />
  73. <!--<lvc:LineSeries
  74. Fill="Transparent"
  75. LineSmoothness="1"
  76. PointGeometry="{x:Null}"
  77. Stroke="#423FFD"
  78. StrokeThickness="2"
  79. Values="{Binding DataFeedback.M102_Speed}" />-->
  80. </lvc:CartesianChart.Series>
  81. <lvc:CartesianChart.AxisY>
  82. <lvc:Axis
  83. LabelFormatter="{Binding doubleFormatter}"
  84. MaxValue="0.6" MinValue="-0.1">
  85. <lvc:Axis.Separator>
  86. <lvc:Separator IsEnabled="False" />
  87. </lvc:Axis.Separator>
  88. </lvc:Axis>
  89. </lvc:CartesianChart.AxisY>
  90. <lvc:CartesianChart.AxisX>
  91. <lvc:Axis LabelFormatter="{Binding DateTimeFormatter}" Unit="{Binding AxisUnit}">
  92. <lvc:Axis.Separator>
  93. <lvc:Separator IsEnabled="False" Step="{Binding AxisStep}" />
  94. </lvc:Axis.Separator>
  95. </lvc:Axis>
  96. </lvc:CartesianChart.AxisX>
  97. </lvc:CartesianChart>
  98. <StackPanel Margin="0,10,0,0" Orientation="Horizontal">
  99. <TextBlock Foreground="White" Text="压力曲线/MPa" />
  100. <!--<Rectangle
  101. Width="20"
  102. Height="2"
  103. Margin="10,0,0,2"
  104. Fill="#423FFD" />
  105. <TextBlock Foreground="White" Text="物料罐转速" />-->
  106. <Rectangle
  107. Width="20" Height="2" Margin="10,0,0,2" Fill="#F44F15" />
  108. <TextBlock Foreground="White" Text="反应釜蒸汽压力" />
  109. </StackPanel>
  110. </StackPanel>
  111. <StackPanel
  112. Margin="20" Orientation="Vertical" Visibility="Visible">
  113. <lvc:CartesianChart
  114. Height="270" HorizontalAlignment="Stretch" VerticalAlignment="Top" AnimationsSpeed="0:0:1"
  115. DataTooltip="{x:Null}"
  116. Hoverable="False" MouseDoubleClick="DataView_CLick" ToolTip="比例阀开度曲线">
  117. <lvc:CartesianChart.Series>
  118. <lvc:LineSeries
  119. Fill="Transparent" LineSmoothness="1"
  120. PointGeometry="{x:Null}"
  121. Stroke="White" StrokeThickness="2"
  122. Values="{Binding DataFeedback.ProportionalValveOpening}" />
  123. </lvc:CartesianChart.Series>
  124. <lvc:CartesianChart.AxisY>
  125. <lvc:Axis MaxValue="100" MinValue="0">
  126. <lvc:Axis.Separator>
  127. <lvc:Separator IsEnabled="False" />
  128. </lvc:Axis.Separator>
  129. </lvc:Axis>
  130. </lvc:CartesianChart.AxisY>
  131. <lvc:CartesianChart.AxisX>
  132. <lvc:Axis LabelFormatter="{Binding DateTimeFormatter}" Unit="{Binding AxisUnit}">
  133. <lvc:Axis.Separator>
  134. <lvc:Separator IsEnabled="False" Step="{Binding AxisStep}" />
  135. </lvc:Axis.Separator>
  136. </lvc:Axis>
  137. </lvc:CartesianChart.AxisX>
  138. </lvc:CartesianChart>
  139. <StackPanel Margin="0,10,0,0" Orientation="Horizontal">
  140. <TextBlock Foreground="White" Text="比例阀开度曲线" />
  141. <Rectangle
  142. Width="20" Height="2" Margin="20,0,0,2" Fill="White" />
  143. <TextBlock Foreground="White" Text="蒸汽比例阀开度" />
  144. </StackPanel>
  145. </StackPanel>
  146. <StackPanel
  147. Margin="20" Orientation="Vertical" Visibility="Visible">
  148. <lvc:CartesianChart
  149. Height="270" HorizontalAlignment="Stretch" VerticalAlignment="Top" AnimationsSpeed="0:0:1"
  150. DataTooltip="{x:Null}"
  151. Hoverable="False" MouseDoubleClick="DataView_CLick" ToolTip="流量曲线">
  152. <lvc:CartesianChart.Series>
  153. <lvc:LineSeries
  154. Fill="Transparent" LineSmoothness="1"
  155. PointGeometry="{x:Null}"
  156. Stroke="Red" StrokeThickness="2"
  157. Values="{Binding DataFeedback.SteamFlowRate}" />
  158. <lvc:LineSeries
  159. Fill="Transparent" LineSmoothness="1"
  160. PointGeometry="{x:Null}"
  161. Stroke="#F1C74B" StrokeThickness="2"
  162. Values="{Binding DataFeedback.NegativePressureFlowRate}" />
  163. </lvc:CartesianChart.Series>
  164. <lvc:CartesianChart.AxisY>
  165. <lvc:Axis LabelFormatter="{Binding doubleFormatter}">
  166. <lvc:Axis.Separator>
  167. <lvc:Separator IsEnabled="False" />
  168. </lvc:Axis.Separator>
  169. </lvc:Axis>
  170. </lvc:CartesianChart.AxisY>
  171. <lvc:CartesianChart.AxisX>
  172. <lvc:Axis LabelFormatter="{Binding DateTimeFormatter}" Unit="{Binding AxisUnit}">
  173. <lvc:Axis.Separator>
  174. <lvc:Separator IsEnabled="False" Step="{Binding AxisStep}" />
  175. </lvc:Axis.Separator>
  176. </lvc:Axis>
  177. </lvc:CartesianChart.AxisX>
  178. </lvc:CartesianChart>
  179. <StackPanel Margin="0,10,0,0" Orientation="Horizontal">
  180. <TextBlock Foreground="White" Text="流量曲线/Mpa" />
  181. <Rectangle
  182. Width="20" Height="2" Margin="20,0,0,2" Fill="Red" />
  183. <TextBlock Foreground="White" Text="反应釜蒸汽流量" />
  184. <Rectangle
  185. Width="20" Height="2" Margin="20,0,0,2" Fill="#F1C74B" />
  186. <TextBlock Foreground="White" Text="负压流量" />
  187. </StackPanel>
  188. </StackPanel>
  189. <StackPanel
  190. Margin="20" Orientation="Vertical" Visibility="Visible">
  191. <lvc:CartesianChart
  192. Height="270" HorizontalAlignment="Stretch" VerticalAlignment="Top" AnimationsSpeed="0:0:1"
  193. DataTooltip="{x:Null}"
  194. Hoverable="False" MouseDoubleClick="DataView_CLick" ToolTip="重量曲线">
  195. <lvc:CartesianChart.Series>
  196. <lvc:LineSeries
  197. Fill="Transparent" LineSmoothness="1"
  198. PointGeometry="{x:Null}"
  199. Stroke="Blue" StrokeThickness="2"
  200. Values="{Binding DataFeedback.WeighingWaterTankWeight}" />
  201. <lvc:LineSeries
  202. Fill="Transparent" LineSmoothness="1"
  203. PointGeometry="{x:Null}"
  204. Stroke="Brown" StrokeThickness="2"
  205. Values="{Binding DataFeedback.BrineTankWeight}" />
  206. </lvc:CartesianChart.Series>
  207. <lvc:CartesianChart.AxisY>
  208. <lvc:Axis
  209. LabelFormatter="{Binding doubleFormatter}"
  210. MaxValue="30" MinValue="-5">
  211. <lvc:Axis.Separator>
  212. <lvc:Separator IsEnabled="False" />
  213. </lvc:Axis.Separator>
  214. </lvc:Axis>
  215. </lvc:CartesianChart.AxisY>
  216. <lvc:CartesianChart.AxisX>
  217. <lvc:Axis LabelFormatter="{Binding DateTimeFormatter}" Unit="{Binding AxisUnit}">
  218. <lvc:Axis.Separator>
  219. <lvc:Separator IsEnabled="False" Step="{Binding AxisStep}" />
  220. </lvc:Axis.Separator>
  221. </lvc:Axis>
  222. </lvc:CartesianChart.AxisX>
  223. </lvc:CartesianChart>
  224. <StackPanel Margin="0,10,0,0" Orientation="Horizontal">
  225. <TextBlock Foreground="White" Text="重量曲线/kg" />
  226. <Rectangle
  227. Width="20" Height="2" Margin="20,0,0,2" Fill="Blue" />
  228. <TextBlock Foreground="White" Text="冷却水罐重量" />
  229. <Rectangle
  230. Width="20" Height="2" Margin="20,0,0,2" Fill="Brown" />
  231. <TextBlock Foreground="White" Text="卤水罐重量" />
  232. </StackPanel>
  233. </StackPanel>
  234. <StackPanel
  235. Margin="20" Orientation="Vertical" Visibility="Visible">
  236. <lvc:CartesianChart
  237. Height="270" HorizontalAlignment="Stretch" VerticalAlignment="Top" AnimationsSpeed="0:0:1"
  238. DataTooltip="{x:Null}"
  239. Hoverable="False" MouseDoubleClick="DataView_CLick" ToolTip="湿度曲线">
  240. <lvc:CartesianChart.Series>
  241. <lvc:LineSeries
  242. Fill="Transparent" LineSmoothness="1"
  243. PointGeometry="{x:Null}"
  244. Stroke="White" StrokeThickness="2"
  245. Values="{Binding DataFeedback.CondensateWaterHumidity}" />
  246. </lvc:CartesianChart.Series>
  247. <lvc:CartesianChart.AxisY>
  248. <lvc:Axis MaxValue="100" MinValue="0">
  249. <lvc:Axis.Separator>
  250. <lvc:Separator IsEnabled="False" />
  251. </lvc:Axis.Separator>
  252. </lvc:Axis>
  253. </lvc:CartesianChart.AxisY>
  254. <lvc:CartesianChart.AxisX>
  255. <lvc:Axis LabelFormatter="{Binding DateTimeFormatter}" Unit="{Binding AxisUnit}">
  256. <lvc:Axis.Separator>
  257. <lvc:Separator IsEnabled="False" Step="{Binding AxisStep}" />
  258. </lvc:Axis.Separator>
  259. </lvc:Axis>
  260. </lvc:CartesianChart.AxisX>
  261. </lvc:CartesianChart>
  262. <StackPanel Margin="0,10,0,0" Orientation="Horizontal">
  263. <TextBlock Foreground="White" Text="湿度曲线" />
  264. <Rectangle
  265. Width="20" Height="2" Margin="20,0,0,2" Fill="White" />
  266. <TextBlock Foreground="White" Text="冷凝水罐湿度" />
  267. </StackPanel>
  268. </StackPanel>
  269. <StackPanel
  270. Margin="20" Orientation="Vertical" Visibility="Visible">
  271. <lvc:CartesianChart
  272. Height="270" HorizontalAlignment="Stretch" VerticalAlignment="Top" AnimationsSpeed="0:0:1"
  273. DataTooltip="{x:Null}"
  274. Hoverable="False" MouseDoubleClick="DataView_CLick" ToolTip="反应釜角度曲线">
  275. <lvc:CartesianChart.Series>
  276. <lvc:LineSeries
  277. Fill="Transparent" LineSmoothness="1"
  278. PointGeometry="{x:Null}"
  279. Stroke="White" StrokeThickness="2"
  280. Values="{Binding DataFeedback.ReactEncoderValue}" />
  281. </lvc:CartesianChart.Series>
  282. <lvc:CartesianChart.AxisY>
  283. <lvc:Axis MaxValue="400" MinValue="0">
  284. <lvc:Axis.Separator>
  285. <lvc:Separator IsEnabled="False" />
  286. </lvc:Axis.Separator>
  287. </lvc:Axis>
  288. </lvc:CartesianChart.AxisY>
  289. <lvc:CartesianChart.AxisX>
  290. <lvc:Axis LabelFormatter="{Binding DateTimeFormatter}" Unit="{Binding AxisUnit}">
  291. <lvc:Axis.Separator>
  292. <lvc:Separator IsEnabled="False" Step="{Binding AxisStep}" />
  293. </lvc:Axis.Separator>
  294. </lvc:Axis>
  295. </lvc:CartesianChart.AxisX>
  296. </lvc:CartesianChart>
  297. <StackPanel Margin="0,10,0,0" Orientation="Horizontal">
  298. <TextBlock Foreground="White" Text="反应釜角度曲线" />
  299. <Rectangle
  300. Width="20" Height="2" Margin="20,0,0,2" Fill="White" />
  301. <TextBlock Foreground="White" Text="反应釜编码器角度值" />
  302. </StackPanel>
  303. </StackPanel>
  304. </UniformGrid>
  305. </ScrollViewer>
  306. <Grid
  307. x:Name="chartGrid" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Background="White"
  308. Visibility="Collapsed">
  309. <Grid.ColumnDefinitions>
  310. <ColumnDefinition />
  311. <ColumnDefinition Width="200" />
  312. </Grid.ColumnDefinitions>
  313. <oxy:PlotView
  314. x:Name="chartView" Margin="5" Background="Transparent" Foreground="Black"
  315. PanCursor="Hand" />
  316. <Button
  317. Grid.Column="1" Width="120" Height=" 40" HorizontalAlignment="Center"
  318. VerticalAlignment="Center" Click="Button_Click" Content="退出" />
  319. </Grid>
  320. </Grid>
  321. </UserControl>