WorkRunView.xaml 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439
  1. <UserControl x:Class="DefaultEdit.Views.WorkRunView"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:scottplot="clr-namespace:ScottPlot.WPF;assembly=ScottPlot.WPF"
  7. xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
  8. xmlns:local="clr-namespace:DefaultEdit.Views"
  9. xmlns:prism="http://prismlibrary.com/"
  10. xmlns:c="clr-namespace:DefaultEdit.ValueConverters"
  11. xmlns:Viewlocal="clr-namespace:DefaultEdit.ViewModels"
  12. prism:ViewModelLocator.AutoWireViewModel="True"
  13. mc:Ignorable="d"
  14. d:DesignHeight="850"
  15. d:DesignWidth="1200">
  16. <UserControl.Resources>
  17. <c:BoolToStrConverter x:Key="boolTostr"></c:BoolToStrConverter>
  18. </UserControl.Resources>
  19. <Grid>
  20. <Grid.RowDefinitions>
  21. <RowDefinition Height="Auto" />
  22. <RowDefinition Height="Auto" />
  23. <RowDefinition Height="*" />
  24. </Grid.RowDefinitions>
  25. <Border Grid.Row="0"
  26. Margin="5"
  27. BorderBrush="#7AB0F0"
  28. BorderThickness="2"
  29. CornerRadius="5"
  30. Padding="1">
  31. <Grid>
  32. <Grid.ColumnDefinitions>
  33. <ColumnDefinition Width="20*" />
  34. <ColumnDefinition Width="40*" />
  35. <ColumnDefinition Width="40*" />
  36. </Grid.ColumnDefinitions>
  37. <Grid Grid.Column="0">
  38. <Grid.RowDefinitions>
  39. <RowDefinition />
  40. <RowDefinition />
  41. </Grid.RowDefinitions>
  42. <StackPanel Orientation="Horizontal"
  43. Grid.Row="0"
  44. VerticalAlignment="Bottom">
  45. <TextBlock Text="用户名"
  46. Margin="20,5,5,5"
  47. FontSize="18" />
  48. <TextBlock Text="{Binding Management.UserName}"
  49. Margin="20,5,5,5"
  50. FontSize="18" />
  51. </StackPanel>
  52. <StackPanel Orientation="Vertical"
  53. Grid.Row="1"
  54. VerticalAlignment="Bottom">
  55. <StackPanel Orientation="Horizontal">
  56. <Button Content="登录"
  57. Width="65"
  58. Background="#7E61E0"
  59. Margin="20,5,5,5"
  60. Command="{Binding OpenRoleLoginViewCommand}"
  61. FontSize="18" />
  62. <!--<Button Content="账户退出"
  63. Width="75"
  64. Background="#7E61E0"
  65. Margin="20,5,5,5"
  66. Command="{Binding DLoginCommand}"
  67. FontSize="18" />-->
  68. <TextBlock Text="当前:" Margin="10,10,0,0"/>
  69. <Button Content="{Binding Management.Ismeswork,Converter={StaticResource boolTostr}}"
  70. Width="65"
  71. Command="{Binding SwitchModeCommand}"
  72. Background="#7E61E0"
  73. Margin="0,5,5,5"
  74. FontSize="18" />
  75. </StackPanel>
  76. <!--<StackPanel Orientation="Horizontal">
  77. <TextBlock Text="当前:" Margin="10,10,0,0"/>
  78. <Button Content="{Binding Management.Ismeswork,Converter={StaticResource boolTostr}}"
  79. Width="65"
  80. Command="{Binding SwitchModeCommand}"
  81. Background="#7E61E0"
  82. Margin="0,5,5,5"
  83. FontSize="18" />
  84. </StackPanel>-->
  85. </StackPanel>
  86. </Grid>
  87. <Grid Grid.Column="1"
  88. Margin="5,5,30,5"
  89. Height="300">
  90. <scottplot:WpfPlot Name="plot"
  91. Grid.Column="0"
  92. />
  93. </Grid>
  94. <Grid Grid.Column="2"
  95. Margin="0,20,0,0">
  96. <Grid.ColumnDefinitions>
  97. <ColumnDefinition />
  98. <ColumnDefinition />
  99. <ColumnDefinition />
  100. </Grid.ColumnDefinitions>
  101. <Grid.RowDefinitions>
  102. <RowDefinition />
  103. <RowDefinition />
  104. <RowDefinition />
  105. <RowDefinition />
  106. <RowDefinition />
  107. <RowDefinition />
  108. <RowDefinition />
  109. <RowDefinition />
  110. </Grid.RowDefinitions>
  111. <TextBlock Text="顶出工位"
  112. Margin="0,0,80,0"
  113. Grid.Row="0"
  114. Grid.Column="0" />
  115. <TextBlock Text="{Binding Management.CurrStationRfid[0]}"
  116. Margin="0,0,80,0"
  117. Grid.Row="0"
  118. Grid.Column="0" />
  119. <TextBlock Text="离心工位#1-1"
  120. Grid.Row="2"
  121. Grid.Column="0" />
  122. <TextBlock Text="离心工位#1-2"
  123. Grid.Row="2"
  124. Grid.Column="1" />
  125. <TextBlock Text="{Binding Management.CurrStationRfid[1]}"
  126. Grid.Row="1"
  127. Grid.Column="0" />
  128. <TextBlock Text="{Binding Management.CurrStationRfid[2]}"
  129. Grid.Row="1"
  130. Grid.Column="1" />
  131. <TextBlock Text="离心工位#2-1"
  132. Grid.Row="4"
  133. Grid.Column="0" />
  134. <TextBlock Text="离心工位#2-2"
  135. Grid.Row="4"
  136. Grid.Column="1" />
  137. <TextBlock Text="{Binding Management.CurrStationRfid[3]}"
  138. Grid.Row="5"
  139. Grid.Column="0" />
  140. <TextBlock Text="{Binding Management.CurrStationRfid[4]}"
  141. Grid.Row="5"
  142. Grid.Column="1" />
  143. <TextBlock Text="#1固化工位1"
  144. Grid.Row="6"
  145. Grid.Column="0" />
  146. <TextBlock Text="#1固化工位#2"
  147. Grid.Row="6"
  148. Grid.Column="1" />
  149. <TextBlock Text="{Binding Management.CurrStationRfid[5]}"
  150. Grid.Row="7"
  151. Grid.Column="0" />
  152. <TextBlock Text="{Binding Management.CurrStationRfid[6]}"
  153. Grid.Row="7"
  154. Grid.Column="1" />
  155. </Grid>
  156. </Grid>
  157. </Border>
  158. <Border Grid.Row="1"
  159. Margin="5"
  160. BorderBrush="#7AB0F0"
  161. BorderThickness="2"
  162. CornerRadius="5"
  163. Padding="1">
  164. <Grid>
  165. <Grid.ColumnDefinitions>
  166. <ColumnDefinition Width="Auto" />
  167. <ColumnDefinition Width="Auto" />
  168. <ColumnDefinition Width="*" />
  169. </Grid.ColumnDefinitions>
  170. <TextBlock Text="后处理"
  171. FontSize="20"
  172. Grid.Column="0"
  173. Margin="50,5,50,5"
  174. VerticalAlignment="Center" />
  175. <StackPanel Width="5"
  176. Height="140"
  177. Background="DarkGray"
  178. Grid.Column="1">
  179. </StackPanel>
  180. <Grid Grid.Column="2">
  181. <Grid.RowDefinitions>
  182. <RowDefinition />
  183. <RowDefinition />
  184. </Grid.RowDefinitions>
  185. <Grid.ColumnDefinitions>
  186. <ColumnDefinition />
  187. <ColumnDefinition />
  188. <ColumnDefinition />
  189. <ColumnDefinition />
  190. <ColumnDefinition />
  191. <ColumnDefinition />
  192. </Grid.ColumnDefinitions>
  193. <StackPanel Grid.Row="0"
  194. Grid.Column="0">
  195. <TextBlock Text="离心1转速"
  196. Margin="0,0,80,0" />
  197. <TextBlock Text="{Binding Management.CurrConfig.RealSpeed}"
  198. Margin="0,0,80,0" />
  199. </StackPanel>
  200. <StackPanel Grid.Row="0"
  201. Grid.Column="1">
  202. <TextBlock Text="离心1时间"
  203. Margin="0,0,80,0" />
  204. <TextBlock Text="{Binding Management.CurrConfig.Realtime}"
  205. Margin="0,0,80,0" />
  206. </StackPanel>
  207. <StackPanel Grid.Row="0"
  208. Grid.Column="2">
  209. <TextBlock Text="离心2转速"
  210. Margin="0,0,80,0" />
  211. <TextBlock Text="{Binding Management.CurrConfig.RealSpeed2}"
  212. Margin="0,0,80,0" />
  213. </StackPanel>
  214. <StackPanel Grid.Row="0"
  215. Grid.Column="3">
  216. <TextBlock Text="离心2时间"
  217. Margin="0,0,80,0" />
  218. <TextBlock Text="{Binding Management.CurrConfig.Realtime2}"
  219. Margin="0,0,80,0" />
  220. </StackPanel>
  221. <StackPanel Grid.Row="1"
  222. Grid.Column="0">
  223. <TextBlock Text="固化箱压力"
  224. Margin="0,0,80,0" />
  225. <TextBlock Text="{Binding Management.CurrConfig.Pressure1}"
  226. Margin="0,0,80,0" />
  227. </StackPanel>
  228. <StackPanel Grid.Row="1"
  229. Grid.Column="1">
  230. <TextBlock Text="光固化时间"
  231. Margin="0,0,80,0" />
  232. <TextBlock Text="{Binding Management.CurrConfig.Realtime3}"
  233. Margin="0,0,80,0" />
  234. </StackPanel>
  235. </Grid>
  236. </Grid>
  237. </Border>
  238. <Grid Grid.Row="2">
  239. <Grid.ColumnDefinitions>
  240. <ColumnDefinition Width="20*"/>
  241. <ColumnDefinition Width="40*"/>
  242. <ColumnDefinition Width="40*"/>
  243. </Grid.ColumnDefinitions>
  244. <Grid Grid.Column="0">
  245. <Grid.RowDefinitions>
  246. <RowDefinition Height="Auto" />
  247. <RowDefinition />
  248. </Grid.RowDefinitions>
  249. <TextBlock Text="后处理配方参数"
  250. FontSize="20" />
  251. <Border Margin="5"
  252. Grid.Row="1"
  253. BorderBrush="#7AB0F0"
  254. BorderThickness="2"
  255. CornerRadius="5"
  256. Padding="1">
  257. <Grid>
  258. <Grid.ColumnDefinitions>
  259. <ColumnDefinition />
  260. <ColumnDefinition />
  261. <ColumnDefinition />
  262. </Grid.ColumnDefinitions>
  263. <Grid.RowDefinitions>
  264. <RowDefinition />
  265. <RowDefinition />
  266. <RowDefinition />
  267. <RowDefinition />
  268. <RowDefinition />
  269. <RowDefinition />
  270. <RowDefinition />
  271. <RowDefinition />
  272. <RowDefinition />
  273. </Grid.RowDefinitions>
  274. <TextBlock Text="配方名称"
  275. Grid.Row="0"
  276. Grid.Column="0" />
  277. <TextBlock Text="后处理配方"
  278. Grid.Row="0"
  279. Grid.Column="2" />
  280. <!--<TextBlock Text="后处理配方(本地)"
  281. Grid.Row="0"
  282. Grid.Column="2" />-->
  283. <TextBlock Text="第一次离心转速"
  284. Grid.Row="1"
  285. Grid.Column="0" />
  286. <!--<TextBlock Text="{Binding Management.CurrConfig.Speed}"
  287. Grid.Row="1"
  288. Grid.Column="1" />-->
  289. <TextBlock Text="{Binding Management.Formulasdata.第一次离心转速}"
  290. Grid.Row="1"
  291. Grid.Column="2" />
  292. <TextBlock Text="第一次离心时间"
  293. Grid.Row="2"
  294. Grid.Column="0" />
  295. <!--<TextBlock Text="{Binding Management.CurrConfig.Time.TotalSeconds}"
  296. Grid.Row="2"
  297. Grid.Column="1" />-->
  298. <TextBlock Text="{Binding Management.Formulasdata.第一次离心时间}"
  299. Grid.Row="2"
  300. Grid.Column="2" />
  301. <TextBlock Text="第二次离心转速"
  302. Grid.Row="3"
  303. Grid.Column="0" />
  304. <!--<TextBlock Text="{Binding Management.CurrConfig.Speed2}"
  305. Grid.Row="3"
  306. Grid.Column="1" />-->
  307. <TextBlock Text="{Binding Management.Formulasdata.第二次离心转速}"
  308. Grid.Row="3"
  309. Grid.Column="2" />
  310. <TextBlock Text="第二次离心时间"
  311. Grid.Row="4"
  312. Grid.Column="0" />
  313. <!--<TextBlock Text="{Binding Management.CurrConfig.Time2.TotalSeconds}"
  314. Grid.Row="4"
  315. Grid.Column="1" />-->
  316. <TextBlock Text="{Binding Management.Formulasdata.第二次离心时间}"
  317. Grid.Row="4"
  318. Grid.Column="2" />
  319. <TextBlock Text="光固化时间"
  320. Grid.Row="5"
  321. Grid.Column="0" />
  322. <!--<TextBlock Text="{Binding Management.CurrConfig.PTime1.TotalSeconds}"
  323. Grid.Row="5"
  324. Grid.Column="1" />-->
  325. <TextBlock Text="{Binding Management.Formulasdata.光固化时间}"
  326. Grid.Row="5"
  327. Grid.Column="2" />
  328. </Grid>
  329. </Border>
  330. </Grid>
  331. <Grid Grid.Column="1">
  332. <Grid.RowDefinitions>
  333. <RowDefinition Height="Auto" />
  334. <RowDefinition />
  335. </Grid.RowDefinitions>
  336. <StackPanel Orientation="Horizontal">
  337. <TextBlock Text="过程信息"
  338. Margin="0,0,40,0"
  339. FontSize="20" />
  340. <Button Content="清空"
  341. Width="80"
  342. Command="{Binding ClearRunDataCommand}"
  343. Background="#1152D7"
  344. HorizontalAlignment="Right"
  345. FontSize="20" />
  346. </StackPanel>
  347. <Border Margin="5"
  348. Grid.Row="1"
  349. BorderBrush="#7AB0F0"
  350. BorderThickness="2"
  351. CornerRadius="5"
  352. Padding="1">
  353. <ListView ItemsSource="{Binding Management.RuningData}">
  354. <ListView.View>
  355. <GridView>
  356. <GridViewColumn Header="网板ID"
  357. DisplayMemberBinding="{Binding Rfid}"
  358. Width="150" />
  359. <GridViewColumn Header="状态"
  360. DisplayMemberBinding="{Binding State}"
  361. Width="200" />
  362. <GridViewColumn Header="批次信息"
  363. DisplayMemberBinding="{Binding ModelsInfo}"
  364. Width="200" />
  365. <GridViewColumn Header="开始时间"
  366. DisplayMemberBinding="{Binding StartTime,StringFormat=yyyy-MM-dd}"
  367. Width="200" />
  368. </GridView>
  369. </ListView.View>
  370. </ListView>
  371. </Border>
  372. </Grid>
  373. <Grid Grid.Column="2" >
  374. <Grid.RowDefinitions>
  375. <RowDefinition Height="Auto" />
  376. <RowDefinition />
  377. </Grid.RowDefinitions>
  378. <StackPanel Orientation="Horizontal">
  379. <TextBlock Text="日志"
  380. Margin="0,0,40,0"
  381. FontSize="20" />
  382. <Button Content="清空"
  383. Width="80"
  384. Background="#1152D7"
  385. Command="{Binding ClearLogDataCommand}"
  386. HorizontalAlignment="Right"
  387. FontSize="20" />
  388. </StackPanel>
  389. <Border Margin="5"
  390. Grid.Row="1"
  391. BorderBrush="#7AB0F0"
  392. BorderThickness="2"
  393. CornerRadius="5"
  394. Padding="1">
  395. <ListBox ItemsSource="{Binding Logs}">
  396. </ListBox>
  397. </Border>
  398. </Grid>
  399. </Grid>
  400. </Grid>
  401. </UserControl>