SampleSmart 1.0.0.0
SampleSmart 사용 방법을 보여 주는 예제 프로젝트입니다.
로딩중...
검색중...
일치하는것 없음
TcpClientTestView.xaml.ViewModel.cs
이 파일의 문서화 페이지로 가기
1using Dreamine.MVVM.Attributes;
2using Dreamine.MVVM.ViewModels;
3
5
14public partial class TcpClientTestViewModel : ViewModelBase
15{
24 [DreamineEvent]
26
35 public IReadOnlyList<string> TcpClientProtocols => Event.TcpClientProtocols;
36
45 public IReadOnlyList<string> TcpClientEncodings => Event.TcpClientEncodings;
46
56 {
57 get => Event.SelectedTcpClientProtocol;
58 set
59 {
60 if (Event.SelectedTcpClientProtocol == value)
61 {
62 return;
63 }
64
65 Event.SelectedTcpClientProtocol = value;
66 OnPropertyChanged(nameof(SelectedTcpClientProtocol));
67 }
68 }
69
79 {
80 get => Event.SelectedTcpClientEncoding;
81 set
82 {
83 if (Event.SelectedTcpClientEncoding == value)
84 {
85 return;
86 }
87
88 Event.SelectedTcpClientEncoding = value;
89 OnPropertyChanged(nameof(SelectedTcpClientEncoding));
90 }
91 }
92
101 public string TcpClientSendText
102 {
103 get => Event.TcpClientSendText;
104 set => Event.TcpClientSendText = value;
105 }
106
115 [DreamineCommand("Event.ConnectClient")]
116 private partial void ConnectClient();
117
126 [DreamineCommand("Event.DisconnectClient")]
127 private partial void DisconnectClient();
128
137 [DreamineCommand("Event.SendClient")]
138 private partial void SendClient();
139
157 {
158 ArgumentNullException.ThrowIfNull(@event);
159
160 _event = @event;
161 }
162}