SampleSmart
1.0.0.0
SampleSmart 사용 방법을 보여 주는 예제 프로젝트입니다.
Toggle main menu visibility
로딩중...
검색중...
일치하는것 없음
SerialPortTestView.xaml.ViewModel.cs
이 파일의 문서화 페이지로 가기
1
using
Dreamine.MVVM.Attributes;
2
using
Dreamine.MVVM.ViewModels;
3
4
namespace
SampleSmart.Pages.PageSub.CommunicationTabs.Serial
;
5
14
public
partial class
SerialPortTestViewModel
: ViewModelBase
15
{
24
[DreamineEvent]
25
private
SerialPortTestViewEvent
_event
;
26
35
public
IReadOnlyList<string>
SerialPortNames
=> Event.SerialPortNames;
36
45
public
IReadOnlyList<int>
BaudRates
=> Event.BaudRates;
46
55
public
IReadOnlyList<string>
SerialProtocols
=> Event.SerialProtocols;
56
65
public
IReadOnlyList<string>
SerialEncodings
=> Event.SerialEncodings;
66
75
public
string
SelectedSerialPortName
76
{
77
get
=> Event.SelectedSerialPortName;
78
set
79
{
80
if
(Event.SelectedSerialPortName == value)
81
{
82
return
;
83
}
84
85
Event.SelectedSerialPortName = value;
86
OnPropertyChanged(nameof(
SelectedSerialPortName
));
87
OnPropertyChanged(nameof(
SerialSelectionSummary
));
88
}
89
}
90
99
public
int
SelectedBaudRate
100
{
101
get
=> Event.SelectedBaudRate;
102
set
103
{
104
if
(Event.SelectedBaudRate == value)
105
{
106
return
;
107
}
108
109
Event.SelectedBaudRate = value;
110
OnPropertyChanged(nameof(
SelectedBaudRate
));
111
OnPropertyChanged(nameof(
SerialSelectionSummary
));
112
}
113
}
114
123
public
string
SelectedSerialProtocol
124
{
125
get
=> Event.SelectedSerialProtocol;
126
set
127
{
128
if
(Event.SelectedSerialProtocol == value)
129
{
130
return
;
131
}
132
133
Event.SelectedSerialProtocol = value;
134
OnPropertyChanged(nameof(
SelectedSerialProtocol
));
135
OnPropertyChanged(nameof(
SerialSelectionSummary
));
136
}
137
}
138
147
public
string
SelectedSerialEncoding
148
{
149
get
=> Event.SelectedSerialEncoding;
150
set
151
{
152
if
(Event.SelectedSerialEncoding == value)
153
{
154
return
;
155
}
156
157
Event.SelectedSerialEncoding = value;
158
OnPropertyChanged(nameof(
SelectedSerialEncoding
));
159
OnPropertyChanged(nameof(
SerialSelectionSummary
));
160
}
161
}
162
171
public
string
SerialSendText
172
{
173
get
=> Event.SerialSendText;
174
set
175
{
176
if
(Event.SerialSendText == value)
177
{
178
return
;
179
}
180
181
Event.SerialSendText = value;
182
OnPropertyChanged(nameof(
SerialSendText
));
183
}
184
}
185
194
public
string
SerialSelectionSummary
=> Event.SerialSelectionSummary;
195
204
[DreamineCommand(
"Event.RefreshPorts"
)]
205
private
partial
void
RefreshPorts
();
206
215
[DreamineCommand(
"Event.ConnectSerial"
)]
216
private
partial
void
ConnectSerial
();
217
226
[DreamineCommand(
"Event.DisconnectSerial"
)]
227
private
partial
void
DisconnectSerial
();
228
237
[DreamineCommand(
"Event.SendSerial"
)]
238
private
partial
void
SendSerial
();
239
256
public
SerialPortTestViewModel
(
SerialPortTestViewEvent
@event)
257
{
258
ArgumentNullException.ThrowIfNull(@event);
259
260
_event
= @event;
261
}
262
}
SampleSmart.Pages.PageSub.CommunicationTabs.Serial
Definition
SerialPortTestView.xaml.cs:18
SampleSmart.Pages.PageSub.CommunicationTabs.Serial.SerialPortTestViewEvent
Definition
SerialPortTestView.xaml.Event.cs:17
SampleSmart.Pages.PageSub.CommunicationTabs.Serial.SerialPortTestViewModel.SendSerial
partial void SendSerial()
SampleSmart.Pages.PageSub.CommunicationTabs.Serial.SerialPortTestViewModel.SerialEncodings
IReadOnlyList< string > SerialEncodings
Definition
SerialPortTestView.xaml.ViewModel.cs:65
SampleSmart.Pages.PageSub.CommunicationTabs.Serial.SerialPortTestViewModel.SerialPortNames
IReadOnlyList< string > SerialPortNames
Definition
SerialPortTestView.xaml.ViewModel.cs:35
SampleSmart.Pages.PageSub.CommunicationTabs.Serial.SerialPortTestViewModel.SerialPortTestViewModel
SerialPortTestViewModel(SerialPortTestViewEvent @event)
Definition
SerialPortTestView.xaml.ViewModel.cs:256
SampleSmart.Pages.PageSub.CommunicationTabs.Serial.SerialPortTestViewModel._event
SerialPortTestViewEvent _event
Definition
SerialPortTestView.xaml.ViewModel.cs:25
SampleSmart.Pages.PageSub.CommunicationTabs.Serial.SerialPortTestViewModel.SerialSelectionSummary
string SerialSelectionSummary
Definition
SerialPortTestView.xaml.ViewModel.cs:194
SampleSmart.Pages.PageSub.CommunicationTabs.Serial.SerialPortTestViewModel.SelectedSerialEncoding
string SelectedSerialEncoding
Definition
SerialPortTestView.xaml.ViewModel.cs:148
SampleSmart.Pages.PageSub.CommunicationTabs.Serial.SerialPortTestViewModel.RefreshPorts
partial void RefreshPorts()
SampleSmart.Pages.PageSub.CommunicationTabs.Serial.SerialPortTestViewModel.SerialProtocols
IReadOnlyList< string > SerialProtocols
Definition
SerialPortTestView.xaml.ViewModel.cs:55
SampleSmart.Pages.PageSub.CommunicationTabs.Serial.SerialPortTestViewModel.BaudRates
IReadOnlyList< int > BaudRates
Definition
SerialPortTestView.xaml.ViewModel.cs:45
SampleSmart.Pages.PageSub.CommunicationTabs.Serial.SerialPortTestViewModel.SelectedBaudRate
int SelectedBaudRate
Definition
SerialPortTestView.xaml.ViewModel.cs:100
SampleSmart.Pages.PageSub.CommunicationTabs.Serial.SerialPortTestViewModel.SerialSendText
string SerialSendText
Definition
SerialPortTestView.xaml.ViewModel.cs:172
SampleSmart.Pages.PageSub.CommunicationTabs.Serial.SerialPortTestViewModel.SelectedSerialProtocol
string SelectedSerialProtocol
Definition
SerialPortTestView.xaml.ViewModel.cs:124
SampleSmart.Pages.PageSub.CommunicationTabs.Serial.SerialPortTestViewModel.ConnectSerial
partial void ConnectSerial()
SampleSmart.Pages.PageSub.CommunicationTabs.Serial.SerialPortTestViewModel.SelectedSerialPortName
string SelectedSerialPortName
Definition
SerialPortTestView.xaml.ViewModel.cs:76
SampleSmart.Pages.PageSub.CommunicationTabs.Serial.SerialPortTestViewModel.DisconnectSerial
partial void DisconnectSerial()
Pages
PageSub
CommunicationTabs
Serial
SerialPortTestView.xaml.ViewModel.cs
다음에 의해 생성됨 :
1.17.0