Dreamine.Web 1.0.0.0
WPF와 Blazor를 한 코드 흐름으로 연결하고 반복적인 MVVM 코드를 줄이는 오픈소스 FullKit 공식 웹 애플리케이션입니다.
로딩중...
검색중...
일치하는것 없음
DreamineWeb.ViewModels.Demos.LightBulbViewModel 클래스 참조sealed

더 자세히 ...

DreamineWeb.ViewModels.Demos.LightBulbViewModel에 대한 상속 다이어그램 :
DreamineWeb.ViewModels.Demos.LightBulbViewModel에 대한 협력 다이어그램:

Public 멤버 함수

 LightBulbViewModel ()
void Toggle ()

속성

bool IsOn [get, set]
int ToggleCount [get]
string StatusText [get]

Private 멤버 함수

void RaiseState ()

Private 속성

readonly LightBulbModel _model = new()
readonly LightBulbEvent _event

상세한 설명

전구 데모 ViewModel(바인딩). 실제 WPF 샘플에서는 [DreamineModel]/[DreamineEvent]/[DreamineCommand]로 자동 주입·생성되지만, 이 라이브 데모는 브라우저에서 바로 실행되도록 수동 연결한 버전입니다.

LightBulbViewModel.cs 파일의 118 번째 라인에서 정의되었습니다.

생성자 & 소멸자 문서화

◆ LightBulbViewModel()

DreamineWeb.ViewModels.Demos.LightBulbViewModel.LightBulbViewModel ( )
inline

지정한 설정으로 LightBulbViewModel 클래스의 새 인스턴스를 초기화합니다.

LightBulbViewModel.cs 파일의 147 번째 라인에서 정의되었습니다.

147=> _event = new LightBulbEvent(_model);

다음을 참조함 : _event, _model.

멤버 함수 문서화

◆ RaiseState()

void DreamineWeb.ViewModels.Demos.LightBulbViewModel.RaiseState ( )
inlineprivate

Raise State 작업을 수행합니다.

LightBulbViewModel.cs 파일의 209 번째 라인에서 정의되었습니다.

210 {
211 OnPropertyChanged(nameof(IsOn));
212 OnPropertyChanged(nameof(ToggleCount));
213 OnPropertyChanged(nameof(StatusText));
214 }

다음을 참조함 : IsOn, StatusText, ToggleCount.

다음에 의해서 참조됨 : Toggle().

이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ Toggle()

void DreamineWeb.ViewModels.Demos.LightBulbViewModel.Toggle ( )
inline

전구를 토글합니다(버튼 커맨드에 해당).

LightBulbViewModel.cs 파일의 195 번째 라인에서 정의되었습니다.

196 {
197 _event.Toggle();
198 RaiseState();
199 }

다음을 참조함 : _event, RaiseState().

이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:

멤버 데이터 문서화

◆ _event

readonly LightBulbEvent DreamineWeb.ViewModels.Demos.LightBulbViewModel._event
private

event 값을 보관합니다.

LightBulbViewModel.cs 파일의 137 번째 라인에서 정의되었습니다.

다음에 의해서 참조됨 : LightBulbViewModel(), Toggle().

◆ _model

readonly LightBulbModel DreamineWeb.ViewModels.Demos.LightBulbViewModel._model = new()
private

model 값을 보관합니다.

LightBulbViewModel.cs 파일의 128 번째 라인에서 정의되었습니다.

다음에 의해서 참조됨 : LightBulbViewModel().

속성 문서화

◆ IsOn

bool DreamineWeb.ViewModels.Demos.LightBulbViewModel.IsOn
getset

전구 점등 상태. 체크박스와 양방향 바인딩됩니다.

LightBulbViewModel.cs 파일의 157 번째 라인에서 정의되었습니다.

158 {
159 get => _model.IsOn;
160 set
161 {
162 _event.Set(value);
163 RaiseState();
164 }
165 }

다음에 의해서 참조됨 : RaiseState().

◆ StatusText

string DreamineWeb.ViewModels.Demos.LightBulbViewModel.StatusText
get

상태 텍스트.

LightBulbViewModel.cs 파일의 185 번째 라인에서 정의되었습니다.

다음에 의해서 참조됨 : RaiseState().

◆ ToggleCount

int DreamineWeb.ViewModels.Demos.LightBulbViewModel.ToggleCount
get

토글된 총 횟수(Event가 누적).

LightBulbViewModel.cs 파일의 175 번째 라인에서 정의되었습니다.

다음에 의해서 참조됨 : RaiseState().


이 클래스에 대한 문서화 페이지는 다음의 파일로부터 생성되었습니다.: