RecipeTemplateColumnBase.cs 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Collections.ObjectModel;
  4. using System.ComponentModel;
  5. using System.Linq;
  6. using System.Text;
  7. using System.Threading.Tasks;
  8. namespace MECF.Framework.Common.RecipeCenter
  9. {
  10. public class RecipeTemplateColumnBase: INotifyPropertyChanged
  11. {
  12. public RecipeTemplateColumnBase()
  13. {
  14. IsReadOnly = false;
  15. IsEnable = true;
  16. }
  17. public string ValueType { get; set; }
  18. public bool IsReadOnly { get; set; }
  19. public string ModuleName { get; set; }
  20. public string DisplayName { get; set; }
  21. public string ControlName { get; set; }
  22. public string Description { get; set; }
  23. public bool IsEnable { get; set; }
  24. public string Default { get; set; }
  25. private int _selectedValueIndex;
  26. public int SelectedValueIndex
  27. {
  28. get
  29. {
  30. return _selectedValueIndex;
  31. }
  32. set
  33. {
  34. _selectedValueIndex = value;
  35. RaisePropertyChanged("SelectedValueIndex");
  36. }
  37. }
  38. public double Value { get; set; }
  39. public bool EnableConfig { get; set; }
  40. public bool EnableTolerance { get; set; }
  41. public string InputMode { get; set; }
  42. public double Minimun { get; set; }
  43. public double Maximun { get; set; }
  44. public ObservableCollection<Option> Options { get; set; } = new ObservableCollection<Option>();
  45. public event PropertyChangedEventHandler PropertyChanged;
  46. protected void RaisePropertyChanged(string propertyName)
  47. {
  48. PropertyChangedEventHandler propertyChanged = PropertyChanged;
  49. if (propertyChanged != null)
  50. {
  51. propertyChanged(this, new PropertyChangedEventArgs(propertyName));
  52. }
  53. }
  54. }
  55. public class Option
  56. {
  57. public string ControlName { get; set; }
  58. public string DisplayName { get; set; }
  59. public string RelatedParameters { get; set; }
  60. }
  61. }