OperationOverViewModel.cs 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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. public class OperationOverViewModel : BindableBase
  13. {
  14. #region 私有字段
  15. private bool m_TabIsChecked=true;
  16. private ModuleInfo m_LP1ModuleInfo;
  17. private ModuleInfo m_LP2ModuleInfo;
  18. #endregion
  19. #region 属性
  20. public bool TabIsChecked
  21. {
  22. get { return m_TabIsChecked; }
  23. set { SetProperty(ref m_TabIsChecked, value); }
  24. }
  25. public ModuleInfo LP1ModuleInfo
  26. {
  27. get { return m_LP1ModuleInfo; }
  28. set { SetProperty(ref m_LP1ModuleInfo, value); }
  29. }
  30. public ModuleInfo LP2ModuleInfo
  31. {
  32. get { return m_LP2ModuleInfo; }
  33. set { SetProperty(ref m_LP2ModuleInfo, value); }
  34. }
  35. #endregion
  36. #region 构造函数
  37. public OperationOverViewModel()
  38. {
  39. DispatcherTimer timer = new DispatcherTimer();
  40. timer.Interval = TimeSpan.FromSeconds(0.5);
  41. timer.Tick += Timer_Tick;
  42. timer.Start();
  43. }
  44. #endregion
  45. #region 私有方法
  46. private void Timer_Tick(object sender, EventArgs e)
  47. {
  48. LP1ModuleInfo = ModuleManager.ModuleInfos["LP1"];
  49. LP2ModuleInfo = ModuleManager.ModuleInfos["LP1"];
  50. }
  51. #endregion
  52. }
  53. }