SampleSmart 1.0.0.0
SampleSmart 사용 방법을 보여 주는 예제 프로젝트입니다.
로딩중...
검색중...
일치하는것 없음
PlcSimulatorTab.xaml.ViewModel.cs
이 파일의 문서화 페이지로 가기
1using Dreamine.MVVM.Attributes;
2using Dreamine.MVVM.ViewModels;
3
5
14public partial class PlcSimulatorTabViewModel : ViewModelBase
15{
24 [DreamineEvent]
26
35 public string Host
36 {
37 get => Event.Host;
38 set
39 {
40 if (Event.Host == value)
41 {
42 return;
43 }
44
45 Event.Host = value;
46 OnPropertyChanged(nameof(Host));
47 }
48 }
49
58 public string PortText
59 {
60 get => Event.PortText;
61 set
62 {
63 if (Event.PortText == value)
64 {
65 return;
66 }
67
68 Event.PortText = value;
69 OnPropertyChanged(nameof(PortText));
70 }
71 }
72
81 [DreamineCommand("Event.StartServer")]
82 private partial void StartServer();
83
92 [DreamineCommand("Event.StopServer")]
93 private partial void StopServer();
94
103 [DreamineCommand("Event.UseTcpClient")]
104 private partial void UseTcpClient();
105
123 {
124 ArgumentNullException.ThrowIfNull(@event);
125
126 _event = @event;
127 }
128}