TemperatureManualWindow.xaml 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603
  1. <UserControl
  2. x:Class="SHJX.Service.Shell.Views.Manual.TemperatureManualWindow"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:UI="clr-namespace:CustomUI;assembly=SHJX.Service.Library"
  6. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  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. d:DesignHeight="800"
  11. d:DesignWidth="900"
  12. prism:ViewModelLocator.AutoWireViewModel="True"
  13. mc:Ignorable="d">
  14. <UserControl.Resources>
  15. <!--#region CheckBoxStyle-->
  16. <Style x:Key="CheckBoxDefault" TargetType="{x:Type CheckBox}">
  17. <Setter Property="Background" Value="White" />
  18. <Setter Property="BorderBrush" Value="#FF262E34" />
  19. <Setter Property="Foreground" Value="#FF262E34" />
  20. <Setter Property="BorderThickness" Value="1" />
  21. <Setter Property="Template">
  22. <Setter.Value>
  23. <ControlTemplate TargetType="{x:Type CheckBox}">
  24. <StackPanel HorizontalAlignment="Stretch" Orientation="Horizontal">
  25. <Border
  26. Width="15"
  27. Height="15"
  28. Background="{TemplateBinding Background}"
  29. BorderBrush="{TemplateBinding BorderBrush}"
  30. BorderThickness="{TemplateBinding BorderThickness}">
  31. <!-- your color here -->
  32. <Path
  33. Name="eliCheck"
  34. Width="15"
  35. Height="10"
  36. Data="M 2,4 C 2,4 3,5 5,13 C 5,13 5,3 12,0"
  37. Stroke="#6452A4"
  38. StrokeThickness="3"
  39. Visibility="Collapsed" />
  40. </Border>
  41. <TextBlock
  42. Margin="5,0,0,0"
  43. VerticalAlignment="Center"
  44. Foreground="{TemplateBinding Foreground}"
  45. Text="{TemplateBinding Content}" />
  46. </StackPanel>
  47. <ControlTemplate.Triggers>
  48. <Trigger Property="IsMouseOver" Value="True">
  49. <Setter Property="Background" Value="Transparent" />
  50. </Trigger>
  51. <Trigger Property="IsPressed" Value="True">
  52. <Setter Property="Background" Value="#FF9C9E9F" />
  53. </Trigger>
  54. <Trigger Property="IsEnabled" Value="False">
  55. <Setter Property="Background" Value="LightGray" />
  56. <Setter Property="Foreground" Value="Gray" />
  57. <Setter Property="BorderBrush" Value="Gray" />
  58. <Setter TargetName="eliCheck" Property="Opacity" Value="0.5" />
  59. </Trigger>
  60. <Trigger Property="IsChecked" Value="True">
  61. <Setter TargetName="eliCheck" Property="Visibility" Value="Visible" />
  62. </Trigger>
  63. </ControlTemplate.Triggers>
  64. </ControlTemplate>
  65. </Setter.Value>
  66. </Setter>
  67. </Style>
  68. <!--#endregion-->
  69. <DataTemplate x:Key="itemTemplate">
  70. <pu:MultiComboBoxItem Content="{Binding Content}" IsSelected="{Binding IsChecked}" />
  71. </DataTemplate>
  72. </UserControl.Resources>
  73. <Grid>
  74. <Grid.RowDefinitions>
  75. <RowDefinition Height="1.3*" />
  76. <RowDefinition Height="1.3*" />
  77. <RowDefinition Height="1.4*" />
  78. </Grid.RowDefinitions>
  79. <GroupBox
  80. Grid.Row="0"
  81. Width="800"
  82. Height="260"
  83. Margin="0,5,0,5"
  84. HorizontalAlignment="Center"
  85. VerticalAlignment="Center"
  86. pu:GroupBoxHelper.CornerRadius="8"
  87. pu:GroupBoxHelper.IsSplitLineVisible="True"
  88. pu:GroupBoxHelper.ShadowColor="LightGray"
  89. Header="加热设置(消解位)">
  90. <StackPanel Grid.Row="0" Orientation="Horizontal">
  91. <UI:Dashboard
  92. x:Name="dashboard"
  93. Width="200"
  94. Height="200"
  95. Margin="50,0"
  96. LongTickCount="5"
  97. Maximum="300"
  98. ShortTickCount="2"
  99. Skin="Speed"
  100. Value="{Binding DissolveCurrentTemperatureValue}" />
  101. <Grid
  102. Width="460"
  103. Height="200"
  104. HorizontalAlignment="Center">
  105. <Grid.RowDefinitions>
  106. <RowDefinition />
  107. <RowDefinition />
  108. <RowDefinition />
  109. <RowDefinition />
  110. <RowDefinition />
  111. </Grid.RowDefinitions>
  112. <Grid.ColumnDefinitions>
  113. <ColumnDefinition Width="1*" />
  114. <ColumnDefinition Width="2*" />
  115. <ColumnDefinition Width="1*" />
  116. </Grid.ColumnDefinitions>
  117. <!--#region Border-->
  118. <Border
  119. Grid.Row="0"
  120. Grid.Column="0"
  121. Grid.ColumnSpan="3"
  122. Background="Transparent"
  123. BorderBrush="#6452A4"
  124. BorderThickness="1"
  125. CornerRadius="10,10,0,0" />
  126. <Border
  127. Grid.Row="1"
  128. Grid.Column="0"
  129. Grid.ColumnSpan="3"
  130. Background="Transparent"
  131. BorderBrush="#6452A4"
  132. BorderThickness="1" />
  133. <Border
  134. Grid.Row="2"
  135. Grid.Column="0"
  136. Grid.ColumnSpan="3"
  137. Background="Transparent"
  138. BorderBrush="#6452A4"
  139. BorderThickness="1" />
  140. <Border
  141. Grid.Row="3"
  142. Grid.Column="0"
  143. Grid.ColumnSpan="3"
  144. Background="Transparent"
  145. BorderBrush="#6452A4"
  146. BorderThickness="1" />
  147. <Border
  148. Grid.Row="4"
  149. Grid.Column="0"
  150. Grid.ColumnSpan="3"
  151. Background="Transparent"
  152. BorderBrush="#6452A4"
  153. BorderThickness="1"
  154. CornerRadius="0,0,10,10" />
  155. <Border
  156. Grid.Row="0"
  157. Grid.RowSpan="5"
  158. Grid.Column="3"
  159. Background="Transparent"
  160. BorderBrush="#6452A4"
  161. BorderThickness="1"
  162. CornerRadius="0,10,10,0" />
  163. <!--#endregion-->
  164. <!--#region Columns 1-->
  165. <TextBlock
  166. Grid.Row="0"
  167. Grid.Column="0"
  168. HorizontalAlignment="Right"
  169. VerticalAlignment="Center"
  170. FontWeight="Black"
  171. Text="比例:" />
  172. <TextBlock
  173. Grid.Row="1"
  174. Grid.Column="0"
  175. HorizontalAlignment="Right"
  176. VerticalAlignment="Center"
  177. FontWeight="Black"
  178. Text="积分:" />
  179. <TextBlock
  180. Grid.Row="2"
  181. Grid.Column="0"
  182. HorizontalAlignment="Right"
  183. VerticalAlignment="Center"
  184. FontWeight="Black"
  185. Text="微分:" />
  186. <TextBlock
  187. Grid.Row="3"
  188. Grid.Column="0"
  189. HorizontalAlignment="Right"
  190. VerticalAlignment="Center"
  191. FontWeight="Black"
  192. Text="积分默认值:" />
  193. <TextBlock
  194. Grid.Row="4"
  195. Grid.Column="0"
  196. HorizontalAlignment="Right"
  197. VerticalAlignment="Center"
  198. FontWeight="Black"
  199. Text="温度:" />
  200. <!--#endregion-->
  201. <!--#region Columns 2-->
  202. <TextBox
  203. Grid.Row="0"
  204. Grid.Column="1"
  205. Width="120"
  206. Height="25"
  207. Margin="10,0,0,0"
  208. HorizontalAlignment="Left"
  209. pu:TextBoxHelper.CornerRadius="8"
  210. pu:TextBoxHelper.FocusedBorderBrush="#6452A4"
  211. pu:TextBoxHelper.FocusedShadowColor="#929FDE"
  212. pu:TextBoxHelper.Watermark="0"
  213. Cursor="IBeam"
  214. Text="{Binding DissolvePid.Ratio}" />
  215. <TextBox
  216. Grid.Row="1"
  217. Grid.Column="1"
  218. Width="120"
  219. Height="25"
  220. Margin="10,0,0,0"
  221. HorizontalAlignment="Left"
  222. pu:TextBoxHelper.CornerRadius="8"
  223. pu:TextBoxHelper.FocusedBorderBrush="#6452A4"
  224. pu:TextBoxHelper.FocusedShadowColor="#929FDE"
  225. pu:TextBoxHelper.Watermark="0"
  226. Text="{Binding DissolvePid.Integral}" />
  227. <TextBox
  228. Grid.Row="2"
  229. Grid.Column="1"
  230. Width="120"
  231. Height="25"
  232. Margin="10,0,0,0"
  233. HorizontalAlignment="Left"
  234. pu:TextBoxHelper.CornerRadius="8"
  235. pu:TextBoxHelper.FocusedBorderBrush="#6452A4"
  236. pu:TextBoxHelper.FocusedShadowColor="#929FDE"
  237. pu:TextBoxHelper.Watermark="0"
  238. Text="{Binding DissolvePid.Differential}" />
  239. <TextBox
  240. Grid.Row="3"
  241. Grid.Column="1"
  242. Width="120"
  243. Height="25"
  244. Margin="10,0,0,0"
  245. HorizontalAlignment="Left"
  246. pu:TextBoxHelper.CornerRadius="8"
  247. pu:TextBoxHelper.FocusedBorderBrush="#6452A4"
  248. pu:TextBoxHelper.FocusedShadowColor="#929FDE"
  249. pu:TextBoxHelper.Watermark="0"
  250. Text="{Binding DissolvePid.IntegralDeafult}" />
  251. <TextBox
  252. Name="txt_temp"
  253. Grid.Row="4"
  254. Grid.Column="1"
  255. Width="120"
  256. Height="25"
  257. Margin="10,0,0,0"
  258. HorizontalAlignment="Left"
  259. pu:TextBoxHelper.CornerRadius="8"
  260. pu:TextBoxHelper.FocusedBorderBrush="#6452A4"
  261. pu:TextBoxHelper.FocusedShadowColor="#929FDE"
  262. pu:TextBoxHelper.Watermark="0"
  263. Text="{Binding ManualSettingDissolveTemperatureValue}" />
  264. <!--#endregion-->
  265. <!--#region Columns 3-->
  266. <Button
  267. Grid.Row="0"
  268. Grid.Column="2"
  269. Width="80"
  270. Height="25"
  271. pu:ButtonHelper.ClickStyle="Sink"
  272. pu:ButtonHelper.CornerRadius="10"
  273. pu:ButtonHelper.HoverBrush="#929FDE"
  274. Background="#6452A4"
  275. Command="{Binding ManualSettingRatioCommand}"
  276. Content="设置"
  277. Cursor="Hand" />
  278. <Button
  279. Grid.Row="1"
  280. Grid.Column="2"
  281. Width="80"
  282. Height="25"
  283. pu:ButtonHelper.ClickStyle="Sink"
  284. pu:ButtonHelper.CornerRadius="10"
  285. pu:ButtonHelper.HoverBrush="#929FDE"
  286. Background="#6452A4"
  287. Command="{Binding ManualSettingIntegralCommand}"
  288. Content="设置"
  289. Cursor="Hand" />
  290. <Button
  291. Grid.Row="2"
  292. Grid.Column="2"
  293. Width="80"
  294. Height="25"
  295. pu:ButtonHelper.ClickStyle="Sink"
  296. pu:ButtonHelper.CornerRadius="10"
  297. pu:ButtonHelper.HoverBrush="#929FDE"
  298. Background="#6452A4"
  299. Command="{Binding ManualSettingDifferentialCommand}"
  300. Content="设置"
  301. Cursor="Hand" />
  302. <Button
  303. Grid.Row="3"
  304. Grid.Column="2"
  305. Width="80"
  306. Height="25"
  307. pu:ButtonHelper.ClickStyle="Sink"
  308. pu:ButtonHelper.CornerRadius="10"
  309. pu:ButtonHelper.HoverBrush="#929FDE"
  310. Background="#6452A4"
  311. Command="{Binding ManualSettingIntegralDeafultCommand}"
  312. Content="设置"
  313. Cursor="Hand" />
  314. <Button
  315. Grid.Row="4"
  316. Grid.Column="2"
  317. Width="80"
  318. Height="25"
  319. pu:ButtonHelper.ClickStyle="Sink"
  320. pu:ButtonHelper.CornerRadius="10"
  321. pu:ButtonHelper.HoverBrush="#929FDE"
  322. Background="#6452A4"
  323. Command="{Binding ManualSettingTemperatureCommand}"
  324. CommandParameter="{Binding ElementName=txt_temp, Path=Text}"
  325. Content="设置"
  326. Cursor="Hand" />
  327. <!--#endregion-->
  328. </Grid>
  329. </StackPanel>
  330. </GroupBox>
  331. <GroupBox
  332. Grid.Row="1"
  333. Width="800"
  334. Height="260"
  335. Margin="0,5,0,5"
  336. HorizontalAlignment="Center"
  337. VerticalAlignment="Center"
  338. pu:GroupBoxHelper.CornerRadius="8"
  339. pu:GroupBoxHelper.IsSplitLineVisible="True"
  340. pu:GroupBoxHelper.ShadowColor="LightGray"
  341. Header="加热设置(滴定位)">
  342. <StackPanel Grid.Row="0" Orientation="Horizontal">
  343. <UI:Dashboard
  344. Width="200"
  345. Height="200"
  346. Margin="50,0"
  347. LongTickCount="5"
  348. Maximum="300"
  349. ShortTickCount="2"
  350. Skin="Speed"
  351. Value="{Binding TitrationCurrentTemperatureValue}" />
  352. <Grid
  353. Width="460"
  354. Height="200"
  355. HorizontalAlignment="Center">
  356. <Grid.RowDefinitions>
  357. <RowDefinition />
  358. <RowDefinition />
  359. <RowDefinition />
  360. <RowDefinition />
  361. <RowDefinition />
  362. </Grid.RowDefinitions>
  363. <Grid.ColumnDefinitions>
  364. <ColumnDefinition Width="1*" />
  365. <ColumnDefinition Width="2*" />
  366. <ColumnDefinition Width="1*" />
  367. </Grid.ColumnDefinitions>
  368. <!--#region Border-->
  369. <Border
  370. Grid.Row="0"
  371. Grid.Column="0"
  372. Grid.ColumnSpan="3"
  373. Background="Transparent"
  374. BorderBrush="#6452A4"
  375. BorderThickness="1"
  376. CornerRadius="10,10,0,0" />
  377. <Border
  378. Grid.Row="1"
  379. Grid.Column="0"
  380. Grid.ColumnSpan="3"
  381. Background="Transparent"
  382. BorderBrush="#6452A4"
  383. BorderThickness="1" />
  384. <Border
  385. Grid.Row="2"
  386. Grid.Column="0"
  387. Grid.ColumnSpan="3"
  388. Background="Transparent"
  389. BorderBrush="#6452A4"
  390. BorderThickness="1" />
  391. <Border
  392. Grid.Row="3"
  393. Grid.Column="0"
  394. Grid.ColumnSpan="3"
  395. Background="Transparent"
  396. BorderBrush="#6452A4"
  397. BorderThickness="1" />
  398. <Border
  399. Grid.Row="4"
  400. Grid.Column="0"
  401. Grid.ColumnSpan="3"
  402. Background="Transparent"
  403. BorderBrush="#6452A4"
  404. BorderThickness="1"
  405. CornerRadius="0,0,10,10" />
  406. <Border
  407. Grid.Row="0"
  408. Grid.RowSpan="5"
  409. Grid.Column="3"
  410. Background="Transparent"
  411. BorderBrush="#6452A4"
  412. BorderThickness="1"
  413. CornerRadius="0,10,10,0" />
  414. <!--#endregion-->
  415. <!--#region Columns 1-->
  416. <TextBlock
  417. Grid.Row="0"
  418. Grid.Column="0"
  419. HorizontalAlignment="Right"
  420. VerticalAlignment="Center"
  421. FontWeight="Black"
  422. Text="比例:" />
  423. <TextBlock
  424. Grid.Row="1"
  425. Grid.Column="0"
  426. HorizontalAlignment="Right"
  427. VerticalAlignment="Center"
  428. FontWeight="Black"
  429. Text="积分:" />
  430. <TextBlock
  431. Grid.Row="2"
  432. Grid.Column="0"
  433. HorizontalAlignment="Right"
  434. VerticalAlignment="Center"
  435. FontWeight="Black"
  436. Text="微分:" />
  437. <TextBlock
  438. Grid.Row="3"
  439. Grid.Column="0"
  440. HorizontalAlignment="Right"
  441. VerticalAlignment="Center"
  442. FontWeight="Black"
  443. Text="积分默认值:" />
  444. <TextBlock
  445. Grid.Row="4"
  446. Grid.Column="0"
  447. HorizontalAlignment="Right"
  448. VerticalAlignment="Center"
  449. FontWeight="Black"
  450. Text="温度:" />
  451. <!--#endregion-->
  452. <!--#region Columns 2-->
  453. <TextBox
  454. Grid.Row="0"
  455. Grid.Column="1"
  456. Width="120"
  457. Height="25"
  458. Margin="10,0,0,0"
  459. HorizontalAlignment="Left"
  460. pu:TextBoxHelper.CornerRadius="8"
  461. pu:TextBoxHelper.FocusedBorderBrush="#6452A4"
  462. pu:TextBoxHelper.FocusedShadowColor="#929FDE"
  463. pu:TextBoxHelper.Watermark="0"
  464. Cursor="IBeam"
  465. Text="{Binding TitrationPid.Ratio}" />
  466. <TextBox
  467. Grid.Row="1"
  468. Grid.Column="1"
  469. Width="120"
  470. Height="25"
  471. Margin="10,0,0,0"
  472. HorizontalAlignment="Left"
  473. pu:TextBoxHelper.CornerRadius="8"
  474. pu:TextBoxHelper.FocusedBorderBrush="#6452A4"
  475. pu:TextBoxHelper.FocusedShadowColor="#929FDE"
  476. pu:TextBoxHelper.Watermark="0"
  477. Text="{Binding TitrationPid.Integral}" />
  478. <TextBox
  479. Grid.Row="2"
  480. Grid.Column="1"
  481. Width="120"
  482. Height="25"
  483. Margin="10,0,0,0"
  484. HorizontalAlignment="Left"
  485. pu:TextBoxHelper.CornerRadius="8"
  486. pu:TextBoxHelper.FocusedBorderBrush="#6452A4"
  487. pu:TextBoxHelper.FocusedShadowColor="#929FDE"
  488. pu:TextBoxHelper.Watermark="0"
  489. Text="{Binding TitrationPid.Differential}" />
  490. <TextBox
  491. Grid.Row="3"
  492. Grid.Column="1"
  493. Width="120"
  494. Height="25"
  495. Margin="10,0,0,0"
  496. HorizontalAlignment="Left"
  497. pu:TextBoxHelper.CornerRadius="8"
  498. pu:TextBoxHelper.FocusedBorderBrush="#6452A4"
  499. pu:TextBoxHelper.FocusedShadowColor="#929FDE"
  500. pu:TextBoxHelper.Watermark="0"
  501. Cursor="IBeam"
  502. Text="{Binding TitrationPid.IntegralDeafult}" />
  503. <TextBox
  504. Grid.Row="4"
  505. Grid.Column="1"
  506. Width="120"
  507. Height="25"
  508. Margin="10,0,0,0"
  509. HorizontalAlignment="Left"
  510. pu:TextBoxHelper.CornerRadius="8"
  511. pu:TextBoxHelper.FocusedBorderBrush="#6452A4"
  512. pu:TextBoxHelper.FocusedShadowColor="#929FDE"
  513. pu:TextBoxHelper.Watermark="0"
  514. Cursor="IBeam"
  515. Text="{Binding ManualSettingTitrationTemperatureValue}" />
  516. <!--#endregion-->
  517. <!--#region Columns 3-->
  518. <Button
  519. Grid.Row="0"
  520. Grid.Column="2"
  521. Width="80"
  522. Height="25"
  523. pu:ButtonHelper.ClickStyle="Sink"
  524. pu:ButtonHelper.CornerRadius="10"
  525. pu:ButtonHelper.HoverBrush="#929FDE"
  526. Background="#6452A4"
  527. Command="{Binding ManualSettingRatioCommand}"
  528. Content="设置"
  529. Cursor="Hand" />
  530. <Button
  531. Grid.Row="1"
  532. Grid.Column="2"
  533. Width="80"
  534. Height="25"
  535. pu:ButtonHelper.ClickStyle="Sink"
  536. pu:ButtonHelper.CornerRadius="10"
  537. pu:ButtonHelper.HoverBrush="#929FDE"
  538. Background="#6452A4"
  539. Command="{Binding ManualSettingIntegralCommand}"
  540. Content="设置"
  541. Cursor="Hand" />
  542. <Button
  543. Grid.Row="2"
  544. Grid.Column="2"
  545. Width="80"
  546. Height="25"
  547. pu:ButtonHelper.ClickStyle="Sink"
  548. pu:ButtonHelper.CornerRadius="10"
  549. pu:ButtonHelper.HoverBrush="#929FDE"
  550. Background="#6452A4"
  551. Command="{Binding ManualSettingDifferentialCommand}"
  552. Content="设置"
  553. Cursor="Hand" />
  554. <Button
  555. Grid.Row="3"
  556. Grid.Column="2"
  557. Width="80"
  558. Height="25"
  559. pu:ButtonHelper.ClickStyle="Sink"
  560. pu:ButtonHelper.CornerRadius="10"
  561. pu:ButtonHelper.HoverBrush="#929FDE"
  562. Background="#6452A4"
  563. Command="{Binding ManualSettingIntegralDeafultCommand}"
  564. Content="设置"
  565. Cursor="Hand" />
  566. <Button
  567. Grid.Row="4"
  568. Grid.Column="2"
  569. Width="80"
  570. Height="25"
  571. pu:ButtonHelper.ClickStyle="Sink"
  572. pu:ButtonHelper.CornerRadius="10"
  573. pu:ButtonHelper.HoverBrush="#929FDE"
  574. Background="#6452A4"
  575. Command="{Binding ManualSettingTemperatureCommand}"
  576. CommandParameter="{Binding ElementName=txt_temp, Path=Text}"
  577. Content="设置"
  578. Cursor="Hand" />
  579. <!--#endregion-->
  580. </Grid>
  581. </StackPanel>
  582. </GroupBox>
  583. </Grid>
  584. </UserControl>