WorkRunView.xaml 17 KB

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