SampleSmart 1.0.0.0
SampleSmart 사용 방법을 보여 주는 예제 프로젝트입니다.
로딩중...
검색중...
일치하는것 없음
IoPointState.cs
이 파일의 문서화 페이지로 가기
1using Dreamine.MVVM.ViewModels;
2
4
13public sealed class IoPointState : ViewModelBase
14{
23 private bool _value;
24
57 public IoPointState(int module, int channel, string name)
58 {
59 Module = module;
60 Channel = channel;
61 Name = name;
62 }
63
72 public int Module { get; }
73
82 public int Channel { get; }
83
92 public string Name { get; }
93
102 public bool Value
103 {
104 get => _value;
105 set
106 {
107 if (_value == value)
108 {
109 return;
110 }
111
112 _value = value;
113 OnPropertyChanged(nameof(Value));
114 OnPropertyChanged(nameof(ValueText));
115 }
116 }
117
126 public string ValueText => Value ? "ON" : "OFF";
127}
IoPointState(int module, int channel, string name)