25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
1.6 KiB

  1. using Glorysoft.SECS.EQP.Common;
  2. using System;
  3. using System.Collections;
  4. namespace Glorysoft.SECS.EQP
  5. {
  6. public class SimulatorInfo
  7. {
  8. #region 委托事件
  9. public delegate void PropertyChangedEventHandler();
  10. public event PropertyChangedEventHandler PropertyChanged;
  11. protected virtual void OnPropertyChanged()
  12. {
  13. PropertyChanged?.Invoke();
  14. }
  15. #endregion 委托事件
  16. private static readonly Lazy<SimulatorInfo> LazyInstance = new Lazy<SimulatorInfo>(() => new SimulatorInfo());
  17. private SimulatorInfo()
  18. {
  19. }
  20. public static SimulatorInfo Instance => LazyInstance.Value;
  21. public SECSContext Context { get; set; }
  22. private bool _isConnected = false;
  23. public bool IsConnected { get { return _isConnected; } set { if (_isConnected != value) { _isConnected = value; OnPropertyChanged(); } } }
  24. private string _showInfo;
  25. public string ShowInfo { get { return _showInfo; } set { if (_showInfo != value) { _showInfo = value; if (!string.IsNullOrWhiteSpace(value)) OnPropertyChanged(); } } }
  26. private string _recipeList;
  27. public string RecipeList { get { return _recipeList; } set { if (_recipeList != value) { _recipeList = value; if (!string.IsNullOrWhiteSpace(value)) OnPropertyChanged(); } } }
  28. private string _workFLowFlag;
  29. public string WorkFLowFlag { get { return _workFLowFlag; } set { if (_workFLowFlag != value) { _workFLowFlag = value; if (!string.IsNullOrWhiteSpace(value)) OnPropertyChanged(); } } }
  30. public ScenarioCollection Scenarios { get; set; }
  31. }
  32. }