DocumentNode.cs 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. using SAGA.Models;
  8. namespace SAGA.GplotRelationComputerManage.Draw
  9. {
  10. public class DocumentNode:TNode<DocumentNode>,INotifyPropertyChanged
  11. {
  12. /// <summary>
  13. /// 关联的文件
  14. /// </summary>
  15. public GplotDocument LinkDocument { get; set; }
  16. private bool m_IsExpanded;
  17. public bool IsExpanded
  18. {
  19. get { return this.m_IsExpanded; }
  20. set
  21. {
  22. this.m_IsExpanded = value;
  23. RaisePropertyChanged(nameof(IsExpanded));
  24. }
  25. }
  26. private bool m_IsSelected;
  27. /// <summary>
  28. /// 是否选中
  29. /// </summary>
  30. public bool IsSelected
  31. {
  32. get { return this.m_IsSelected; }
  33. set
  34. {
  35. this.m_IsSelected = value;
  36. RaisePropertyChanged(nameof(IsSelected));
  37. }
  38. }
  39. #region 实现通知接口
  40. public event PropertyChangedEventHandler PropertyChanged;
  41. public void RaisePropertyChanged(string propertyName)
  42. {
  43. PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
  44. }
  45. #endregion
  46. }
  47. }