Param.cs 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Collections.ObjectModel;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. using System.Windows;
  8. using Caliburn.Micro;
  9. using Caliburn.Micro.Core;
  10. namespace RecipeEditorLib.RecipeModel.Params
  11. {
  12. public abstract class Param : PropertyChangedBase
  13. {
  14. public Action<Param> Feedback { get; set; }
  15. public Func<Param, bool> Check { get; set; }
  16. public ObservableCollection<Param> Parent { get; set; }
  17. private string name;
  18. public string Name
  19. {
  20. get { return this.name; }
  21. set
  22. {
  23. this.name = value;
  24. this.NotifyOfPropertyChange("Name");
  25. }
  26. }
  27. private string _displayName;
  28. public string DisplayName
  29. {
  30. get { return this._displayName; }
  31. set
  32. {
  33. this._displayName = value;
  34. this.NotifyOfPropertyChange("DisplayName");
  35. }
  36. }
  37. private bool isEnabled;
  38. public bool IsEnabled
  39. {
  40. get
  41. {
  42. return this.isEnabled;
  43. }
  44. set
  45. {
  46. this.isEnabled = value;
  47. this.NotifyOfPropertyChange("IsEnabled");
  48. }
  49. }
  50. private bool isSaved;
  51. public bool IsSaved
  52. {
  53. get { return this.isSaved; }
  54. set
  55. {
  56. this.isSaved = value;
  57. this.NotifyOfPropertyChange("IsSaved");
  58. }
  59. }
  60. private bool _IsColumnSelected;
  61. public bool IsColumnSelected
  62. {
  63. get { return this._IsColumnSelected; }
  64. set
  65. {
  66. this._IsColumnSelected = value;
  67. this.NotifyOfPropertyChange("IsColumnSelected");
  68. }
  69. }
  70. private Visibility visibility;
  71. public Visibility Visible
  72. {
  73. get { return this.visibility; }
  74. set
  75. {
  76. this.visibility = value;
  77. this.NotifyOfPropertyChange("Visible");
  78. }
  79. }
  80. public bool EnableConfig { get; set; }
  81. public bool EnableTolerance { get; set; }
  82. public Visibility StepCheckVisibility { get; set; }
  83. public Param()
  84. {
  85. this.IsSaved = true;
  86. isEnabled = true;
  87. }
  88. }
  89. }