/// <summary> /// updates controls by the event /// </summary> public void OnUpdateControls(UiPropertiesModel obj) { Paused = obj.Paused; Stopped = obj.Stopped; PleaseWaitVisible = obj.PleaseWaitVisible; if (Stopped && !obj.Init) { PhraseNo = 0; } UpdateStatusProperties(); VerifyClickerInput(); }
/// <summary> /// props for waiting status, updates UpdateControlsEvent /// </summary> public void GetWaitConfiguration() { _log.Called(); UiPropertiesModel uiModel = new UiPropertiesModel() { Paused = false, PleaseWaitVisible = true, UiButtonsEnabled = false, StopBtnEnabled = false, PauseBtnEnabled = false, Stopped = false, Init = false }; _eventAggregator.GetEvent <UpdateControlsEvent>().Publish(uiModel); }
/// <summary> /// async initializes several properties /// </summary> public async Task InitializeProgramAsync() { _log.Called(); try { NameList = new List <string>(); UiControls = new UiPropertiesModel(); SearchPhrase = _config.GetSearchPhrase(); FilePath = _config.GetFilePath(); NameList = await _buttonService.ExecuteUploadButtonAsync(FilePath, true); //need to be loaded before PhraseNo, after FilePath PhraseNo = _config.GetPhraseNo(); } catch (Exception e) { _log.Error(e.Message); } }
} //is `please wait` status? /// <summary> /// controls updated on event handling /// </summary> public void OnUpdateControls(UiPropertiesModel obj) { Paused = obj.Paused; PleaseWaitVisible = obj.PleaseWaitVisible; }
/// <summary> /// updates several UI controls /// </summary> private void OnUpdateControls(UiPropertiesModel obj) { UiControls = obj; }