终端一体化运控平台
Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 

70 linhas
2.5 KiB

  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using Microsoft.Toolkit.Mvvm.ComponentModel;
  7. using System.Collections.ObjectModel;
  8. using BPASmartClient.JXJFoodSmallStation.Model;
  9. using BPASmartClient.Helper;
  10. using Microsoft.Toolkit.Mvvm.Input;
  11. using BPASmartClient.CustomResource.UserControls.MessageShow;
  12. using BPASmartClient.CustomResource.UserControls;
  13. using System.Diagnostics;
  14. using BPASmartClient.JXJFoodSmallStation.Model.Siemens;
  15. using BPASmartClient.JXJFoodSmallStation.Model.HK_PLC;
  16. using System.Threading;
  17. namespace BPASmartClient.JXJFoodSmallStation.ViewModel
  18. {
  19. public class ManualFlowViewModel:ObservableObject
  20. {
  21. public ManualFlowViewModel()
  22. {
  23. Test1Command = new RelayCommand(() =>
  24. {
  25. GVL_SmallStation.AGV_PutTray1Finish = true;
  26. });
  27. Test2Command = new RelayCommand(() =>
  28. {
  29. GVL_SmallStation.WindSendDosingComple = true;
  30. });
  31. Test3Command = new RelayCommand(() =>
  32. {
  33. GVL_SmallStation.AGV_GetTray1Finish = true;
  34. });
  35. Test4Command = new RelayCommand(() =>
  36. {
  37. GVL_SmallStation.CylinderReset = true;
  38. });
  39. Test5Command = new RelayCommand(() =>
  40. {
  41. GVL_SmallStation.WindSendAllowAGVPutGet = true;
  42. });
  43. CLearRecipeInfo = new RelayCommand(() =>
  44. {
  45. ActionManage.GetInstance.Send("CLearRecipeInfo");
  46. });
  47. SystemReset = new RelayCommand(() =>
  48. {
  49. ActionManage.GetInstance.Send("ManualSystemReset");
  50. });
  51. ThreadManage.GetInstance().StartLong(new Action(() =>
  52. {
  53. Heartbeat = GVL_SmallStation.GetInstance.HeartBeatFromPlc;
  54. Thread.Sleep(100);
  55. }), "流程手动设备状态读取",true);
  56. }
  57. public RelayCommand Test1Command { get; set; }
  58. public RelayCommand Test2Command { get; set; }
  59. public RelayCommand Test3Command { get; set; }
  60. public RelayCommand Test4Command { get; set; }
  61. public RelayCommand Test5Command { get; set; }
  62. public bool Heartbeat { get { return _mHeartbeat; } set { _mHeartbeat = value; OnPropertyChanged(); } }
  63. private bool _mHeartbeat;
  64. public RelayCommand CLearRecipeInfo { get; set; }
  65. public RelayCommand SystemReset { get; set; }
  66. }
  67. }