TMViewModel.cs 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. using OpenSEMI.ClientBase;
  2. using Prism.Mvvm;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Linq;
  6. using System.Text;
  7. using System.Threading.Tasks;
  8. using System.Windows.Threading;
  9. using Venus_MainPages.Unity;
  10. namespace Venus_MainPages.ViewModels
  11. {
  12. internal class TMViewModel : BindableBase
  13. {
  14. #region 私有字段
  15. //private ModuleInfo m_PMAWafer;
  16. private ModuleInfo m_LLAWafer;
  17. private ModuleInfo m_LLBWafer;
  18. private bool m_TMIsOFFline;
  19. private bool m_LLIsOFFline;
  20. private WaferInfo m_PMAWafer;
  21. #endregion
  22. #region 属性
  23. public WaferInfo PMAWafer
  24. {
  25. get { return m_PMAWafer; }
  26. set { SetProperty(ref m_PMAWafer, value); }
  27. }
  28. public ModuleInfo LLAWafer
  29. {
  30. get { return m_LLAWafer; }
  31. set { SetProperty(ref m_LLAWafer, value); }
  32. }
  33. public ModuleInfo LLBWafer
  34. {
  35. get { return m_LLBWafer; }
  36. set { SetProperty(ref m_LLBWafer, value); }
  37. }
  38. public bool TMIsOFFline
  39. {
  40. get { return m_TMIsOFFline; }
  41. set { SetProperty(ref m_TMIsOFFline, value); }
  42. }
  43. public bool LLIsOFFline
  44. {
  45. get { return m_LLIsOFFline; }
  46. set { SetProperty(ref m_LLIsOFFline, value); }
  47. }
  48. #endregion
  49. #region 命令
  50. #endregion
  51. #region 构造函数
  52. public TMViewModel()
  53. {
  54. DispatcherTimer timer = new DispatcherTimer();
  55. timer.Interval = TimeSpan.FromSeconds(1);
  56. timer.Tick += Timer_Tick;
  57. timer.Start();
  58. }
  59. private void Timer_Tick(object sender, EventArgs e)
  60. {
  61. LLAWafer = ModuleManager.ModuleInfos["LLA"];
  62. //LLBWafer = ModuleManager.ModuleInfos["LLB"];
  63. PMAWafer = ModuleManager.ModuleInfos["PMA"].WaferManager.Wafers[0];
  64. }
  65. #endregion
  66. }
  67. }