CheckBoxListItem.cs 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. using ReactiveUI;
  2. namespace qmonlib.ui.Models.General
  3. {
  4. public class CheckBoxListItem : ReactiveObject
  5. {
  6. #region *** Private Fields ***
  7. private bool _isChecked;
  8. private string _name;
  9. private string _identity;
  10. #endregion
  11. public string Identity
  12. {
  13. get => _identity;
  14. set => this.RaiseAndSetIfChanged(ref _identity, value);
  15. }
  16. public string Name
  17. {
  18. get=>_name;
  19. set=>this.RaiseAndSetIfChanged(ref _name, value);
  20. }
  21. public bool IsChecked
  22. {
  23. get => _isChecked;
  24. set => this.RaiseAndSetIfChanged(ref _isChecked, value);
  25. }
  26. public CheckBoxListItem(string identity, string name, bool isChecked = false)
  27. {
  28. Identity = identity;
  29. Name = name;
  30. IsChecked = isChecked;
  31. }
  32. public CheckBoxListItem(string name) : this(string.Empty, name) { }
  33. }
  34. }