WorkRunView.xaml 18 KB

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