TitrationManualWindow.xaml 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389
  1. <UserControl
  2. x:Class="SHJX.Service.Shell.Views.Manual.TitrationManualWindow"
  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:lvc="clr-namespace:LiveCharts.Wpf;assembly=LiveCharts.Wpf"
  7. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  8. xmlns:prism="http://prismlibrary.com/"
  9. xmlns:pu="clr-namespace:Panuon.UI.Silver;assembly=Panuon.UI.Silver"
  10. xmlns:wf="clr-namespace:System.Windows.Forms;assembly=System.Windows.Forms"
  11. xmlns:wfi="clr-namespace:System.Windows.Forms.Integration;assembly=WindowsFormsIntegration"
  12. d:DesignHeight="830"
  13. d:DesignWidth="900"
  14. prism:ViewModelLocator.AutoWireViewModel="True"
  15. mc:Ignorable="d">
  16. <Grid>
  17. <Grid.RowDefinitions>
  18. <RowDefinition Height="9*"/>
  19. <RowDefinition Height="9*"/>
  20. </Grid.RowDefinitions>
  21. <GroupBox
  22. Grid.Row="0"
  23. Width="800"
  24. Height="400"
  25. Margin="0,5"
  26. HorizontalAlignment="Center"
  27. VerticalAlignment="Center"
  28. pu:GroupBoxHelper.CornerRadius="8"
  29. pu:GroupBoxHelper.IsSplitLineVisible="True"
  30. pu:GroupBoxHelper.ShadowColor="LightGray"
  31. Header="滴定检测">
  32. <Grid Height="350">
  33. <Grid.RowDefinitions>
  34. <RowDefinition Height="1*" />
  35. <RowDefinition Height="9*" />
  36. </Grid.RowDefinitions>
  37. <Grid.ColumnDefinitions>
  38. <ColumnDefinition Width="4*" />
  39. <ColumnDefinition Width="11*" />
  40. </Grid.ColumnDefinitions>
  41. <Border
  42. Grid.Row="0"
  43. Grid.Column="0"
  44. Grid.ColumnSpan="2"
  45. Background="#6452A4"
  46. CornerRadius="5">
  47. <StackPanel Orientation="Horizontal">
  48. <Label
  49. Content="滴定状态:"
  50. FontSize="18"
  51. FontWeight="Bold"
  52. Foreground="#FFF" />
  53. <pu:Badge
  54. Height="25"
  55. Margin="-15,0,20,0"
  56. HorizontalAlignment="Center"
  57. VerticalAlignment="Center"
  58. Background="{Binding TitrationStatusFill}"
  59. IsWaving="{Binding TitrationStatus}" />
  60. <Label
  61. Content="滴数:"
  62. FontSize="18"
  63. FontWeight="Bold"
  64. Foreground="#FFF" />
  65. <Label
  66. Name="DropCount"
  67. Margin="-15,0,20,0"
  68. Content="{Binding TitrationValue.Count}"
  69. FontSize="18"
  70. Foreground="#FFF" />
  71. <Label
  72. Content="体积:"
  73. FontSize="18"
  74. FontWeight="Bold"
  75. Foreground="#FFF" />
  76. <Label
  77. Name="DropAmount"
  78. Margin="-15,0,20,0"
  79. Content="{Binding TitrationValue.Volume}"
  80. FontSize="18"
  81. Foreground="#FFF" />
  82. <Label
  83. Content="当前检测色值:"
  84. FontSize="18"
  85. FontWeight="Bold"
  86. Foreground="#FFF" />
  87. <Label
  88. Name="DropBlueValue"
  89. Margin="-15,0,0,0"
  90. Content="{Binding TitrationValue.Balance}"
  91. FontSize="18"
  92. Foreground="#FFF" />
  93. </StackPanel>
  94. </Border>
  95. <Border
  96. Grid.Row="1"
  97. Grid.Column="0"
  98. Height="310"
  99. Margin="0,8,5,0"
  100. Background="#6452A4"
  101. CornerRadius="10">
  102. <Border
  103. Width="200"
  104. Height="200"
  105. Margin="0"
  106. HorizontalAlignment="Center"
  107. VerticalAlignment="Center">
  108. <Viewbox>
  109. <wfi:WindowsFormsHost HorizontalAlignment="Center" VerticalAlignment="Center">
  110. <wf:Panel
  111. x:Name="pnlSignal"
  112. Width="200"
  113. Height="200"
  114. Dock="Fill" />
  115. </wfi:WindowsFormsHost>
  116. </Viewbox>
  117. </Border>
  118. </Border>
  119. <Border
  120. Grid.Row="2"
  121. Grid.Column="1"
  122. Margin="0,8,0,0"
  123. VerticalAlignment="Center"
  124. Background="#6452A4"
  125. CornerRadius="10">
  126. <lvc:CartesianChart
  127. Name="Chart"
  128. Grid.Row="1"
  129. Grid.Column="1"
  130. Width="570"
  131. Height="310">
  132. <lvc:CartesianChart.Series>
  133. <lvc:LineSeries
  134. DataLabels="False"
  135. Fill="Transparent"
  136. FontSize="5"
  137. Foreground="#6B303030"
  138. LineSmoothness="1"
  139. PointGeometrySize="0"
  140. Stroke="White"
  141. StrokeThickness="1"
  142. Values="{Binding SeriesCollection}" />
  143. </lvc:CartesianChart.Series>
  144. <lvc:CartesianChart.AxisX>
  145. <lvc:Axis IsEnabled="False" ShowLabels="False" />
  146. </lvc:CartesianChart.AxisX>
  147. <lvc:CartesianChart.AxisY>
  148. <lvc:Axis FontSize="14" Foreground="White">
  149. <lvc:Axis.Separator>
  150. <lvc:Separator
  151. Step="50"
  152. Stroke="#8EFFFFFF"
  153. StrokeDashArray="8"
  154. StrokeThickness="1" />
  155. </lvc:Axis.Separator>
  156. </lvc:Axis>
  157. </lvc:CartesianChart.AxisY>
  158. </lvc:CartesianChart>
  159. </Border>
  160. </Grid>
  161. </GroupBox>
  162. <GroupBox
  163. Grid.Row="1"
  164. Width="800"
  165. Height="380"
  166. Margin="0,5"
  167. HorizontalAlignment="Center"
  168. VerticalAlignment="Center"
  169. pu:GroupBoxHelper.CornerRadius="8"
  170. pu:GroupBoxHelper.IsSplitLineVisible="True"
  171. pu:GroupBoxHelper.ShadowColor="LightGray"
  172. Header="手动滴定">
  173. <Grid>
  174. <Grid.RowDefinitions>
  175. <RowDefinition />
  176. <RowDefinition />
  177. <RowDefinition />
  178. <RowDefinition />
  179. <RowDefinition />
  180. <RowDefinition />
  181. <RowDefinition />
  182. <RowDefinition />
  183. </Grid.RowDefinitions>
  184. <Grid.ColumnDefinitions>
  185. <ColumnDefinition />
  186. <ColumnDefinition />
  187. <ColumnDefinition />
  188. </Grid.ColumnDefinitions>
  189. <TextBlock
  190. Grid.Row="0"
  191. Grid.Column="0"
  192. HorizontalAlignment="Center"
  193. VerticalAlignment="Center"
  194. Text="阈值:" />
  195. <TextBlock
  196. Grid.Row="1"
  197. Grid.Column="0"
  198. HorizontalAlignment="Center"
  199. VerticalAlignment="Center"
  200. Text="滴定前等待时间:" />
  201. <TextBlock
  202. Grid.Row="2"
  203. Grid.Column="0"
  204. HorizontalAlignment="Center"
  205. VerticalAlignment="Center"
  206. Text="到达阈值后的检查次数:" />
  207. <TextBlock
  208. Grid.Row="3"
  209. Grid.Column="0"
  210. HorizontalAlignment="Center"
  211. VerticalAlignment="Center"
  212. Text="最大滴定体积:" />
  213. <TextBlock
  214. Grid.Row="4"
  215. Grid.Column="0"
  216. HorizontalAlignment="Center"
  217. VerticalAlignment="Center"
  218. Text="液体每滴数量:" />
  219. <TextBlock
  220. Grid.Row="5"
  221. Grid.Column="0"
  222. HorizontalAlignment="Center"
  223. VerticalAlignment="Center"
  224. Text="相机最大曝光值:" />
  225. <TextBlock
  226. Grid.Row="6"
  227. Grid.Column="0"
  228. HorizontalAlignment="Center"
  229. VerticalAlignment="Center"
  230. Text="快速滴定值:" />
  231. <TextBox
  232. Grid.Row="0"
  233. Grid.Column="1"
  234. Width="160"
  235. Height="30"
  236. HorizontalAlignment="Center"
  237. VerticalAlignment="Center"
  238. pu:TextBoxHelper.CornerRadius="10"
  239. pu:TextBoxHelper.FocusedBorderBrush="#B5B5B5"
  240. pu:TextBoxHelper.FocusedShadowColor="#B5B5B5"
  241. Text="{Binding TitrationDefaultValue.RangeValue}" />
  242. <TextBox
  243. Grid.Row="1"
  244. Grid.Column="1"
  245. Width="160"
  246. Height="30"
  247. HorizontalAlignment="Center"
  248. VerticalAlignment="Center"
  249. pu:TextBoxHelper.CornerRadius="10"
  250. pu:TextBoxHelper.FocusedBorderBrush="#B5B5B5"
  251. pu:TextBoxHelper.FocusedShadowColor="#B5B5B5"
  252. Text="{Binding TitrationDefaultValue.BeforeWaitTime}" />
  253. <TextBox
  254. Grid.Row="2"
  255. Grid.Column="1"
  256. Width="160"
  257. Height="30"
  258. HorizontalAlignment="Center"
  259. VerticalAlignment="Center"
  260. pu:TextBoxHelper.CornerRadius="10"
  261. pu:TextBoxHelper.FocusedBorderBrush="#B5B5B5"
  262. pu:TextBoxHelper.FocusedShadowColor="#B5B5B5"
  263. Text="{Binding TitrationDefaultValue.ArriveCheckCount}" />
  264. <TextBox
  265. Grid.Row="3"
  266. Grid.Column="1"
  267. Width="160"
  268. Height="30"
  269. HorizontalAlignment="Center"
  270. VerticalAlignment="Center"
  271. pu:TextBoxHelper.CornerRadius="10"
  272. pu:TextBoxHelper.FocusedBorderBrush="#B5B5B5"
  273. pu:TextBoxHelper.FocusedShadowColor="#B5B5B5"
  274. Text="{Binding TitrationDefaultValue.NormalMaxDropVolume}" Cursor="IBeam" />
  275. <TextBox
  276. Grid.Row="4"
  277. Grid.Column="1"
  278. Width="160"
  279. Height="30"
  280. HorizontalAlignment="Center"
  281. VerticalAlignment="Center"
  282. pu:TextBoxHelper.CornerRadius="10"
  283. pu:TextBoxHelper.FocusedBorderBrush="#B5B5B5"
  284. pu:TextBoxHelper.FocusedShadowColor="#B5B5B5"
  285. Cursor="IBeam"
  286. Text="{Binding LiquidAmountValue.Amount}" />
  287. <TextBox
  288. Grid.Row="5"
  289. Grid.Column="1"
  290. Width="160"
  291. Height="30"
  292. HorizontalAlignment="Center"
  293. VerticalAlignment="Center"
  294. pu:TextBoxHelper.CornerRadius="10"
  295. pu:TextBoxHelper.FocusedBorderBrush="#B5B5B5"
  296. pu:TextBoxHelper.FocusedShadowColor="#B5B5B5"
  297. Text="{Binding MaxCameraRange}" />
  298. <StackPanel
  299. Grid.Row="6"
  300. Grid.Column="1"
  301. HorizontalAlignment="Center"
  302. VerticalAlignment="Center"
  303. Orientation="Horizontal">
  304. <TextBox
  305. Width="120"
  306. Height="30"
  307. pu:TextBoxHelper.CornerRadius="10"
  308. pu:TextBoxHelper.FocusedBorderBrush="#B5B5B5"
  309. pu:TextBoxHelper.FocusedShadowColor="#B5B5B5"
  310. Text="{Binding TitrationDefaultValue.QuicklyTitrationValue}" />
  311. <CheckBox
  312. Height="30"
  313. Margin="10,0,0,0"
  314. VerticalAlignment="Center"
  315. pu:CheckBoxHelper.BoxHeight="20"
  316. pu:CheckBoxHelper.BoxWidth="20"
  317. pu:CheckBoxHelper.CheckedBackground="#6452A4"
  318. pu:CheckBoxHelper.CornerRadius="5"
  319. Cursor="Hand"
  320. IsChecked="{Binding OptionTitration}" />
  321. </StackPanel>
  322. <Button
  323. Grid.Row="7"
  324. Grid.Column="0"
  325. Width="120"
  326. Height="40"
  327. Margin="30,0"
  328. pu:ButtonHelper.ClickStyle="Sink"
  329. pu:ButtonHelper.CornerRadius="15"
  330. pu:ButtonHelper.HoverBrush="#929FDE"
  331. Background="#6452A4"
  332. Command="{Binding ManualTitrationCommandStop}"
  333. Content="结束滴定"
  334. Cursor="Hand" IsEnabled="false" Name="Button_Click_Stop" Click="Button_Click" />
  335. <Button
  336. Grid.Row="7"
  337. Grid.Column="2"
  338. Width="120"
  339. Height="40"
  340. Margin="135,2,9,0"
  341. pu:ButtonHelper.ClickStyle="Sink"
  342. pu:ButtonHelper.CornerRadius="15"
  343. pu:ButtonHelper.HoverBrush="#929FDE"
  344. Background="#6452A4"
  345. Command="{Binding ManualExplosionCommand}"
  346. Content="查看相机"
  347. Cursor="Hand" Click="Button_Click_2" />
  348. <Button
  349. Grid.Row="7"
  350. Grid.Column="2"
  351. Width="120"
  352. Height="40"
  353. Margin="10,2,134,0"
  354. pu:ButtonHelper.ClickStyle="Sink"
  355. pu:ButtonHelper.CornerRadius="15"
  356. pu:ButtonHelper.HoverBrush="#929FDE"
  357. Background="#6452A4"
  358. Command="{Binding ManualcheckParams}"
  359. Content="查看参数"
  360. Cursor="Hand" Name="Button_Click_Check" />
  361. <Button
  362. Grid.Row="7"
  363. Grid.Column="1"
  364. Width="120"
  365. Height="40"
  366. Margin="30,0"
  367. pu:ButtonHelper.ClickStyle="Sink"
  368. pu:ButtonHelper.CornerRadius="15"
  369. pu:ButtonHelper.HoverBrush="#929FDE"
  370. Background="#6452A4"
  371. Command="{Binding ManualTitrationCommand}"
  372. Content="开始滴定"
  373. Cursor="Hand" Name="Button_Click_Begin" Click="Button_Click_1" />
  374. </Grid>
  375. </GroupBox>
  376. </Grid>
  377. </UserControl>