private void FireComandExecutedEvent(string commandText, bool result) { if (_eventMgr == null) { return; } DbCommandExecutedMessage message = new DbCommandExecutedMessage(commandText, result); _eventMgr.GetEvent <DbCommandExecutedEvent>().Publish(message); }
private void Init() { _requestViewModelList = new Dictionary <IdentKey, RequestEditViewModel>(); _requestListViewModelList = new Dictionary <IdentKey, RequestListViewModel>(); InitFilter(); _requestChangeCashe = new List <RequestChangedMessage>(); _settingController = new SettingController(this); _eventMgr.GetEvent <DbTransactionFinishEvent>().Subscribe(OnDbTransactionFinished); }
private void FireConnectionChangedEvent(System.Data.ConnectionState prevState, System.Data.ConnectionState newState) { if (_eventMgr == null) { return; } DbConnectionChangedMessage message = new DbConnectionChangedMessage(prevState, newState); _eventMgr.GetEvent <DbConnectionChangedEvent>().Publish(message); }
void FireLoadSettingEvent() { if (!IsConnectWithMessage) { return; } ServiceMgr.Current.GetInstance <IMessageBoxMgr>().ShowAndHideWaitScreen(() => { _eventMgr.GetEvent <MainFormLoadSettingEvent>().Publish(null); }, "Зачекайте, будь ласка", "Завантаження настроювань"); }
private void InitView() { _caption = "Звернення"; _hint = "Реєстр зверненнь"; _image = Properties.Resources.Request; _requestIdentCash = new List<IdentKey>(); _requestList = new EntityList<RequestEntity>(); _control = new RequestListControl(this, _readOnly); _eventMgr.GetEvent<RequestChangedEvent>().Subscribe(OnRequestChanged); InitFilterList(); }
private void InitView() { _image = Properties.Resources.Request; _appList = _nsiService.Applications; _appList.Add(AppEntity.Create()); _orgList = _nsiService.Organizations; _orgList.Add(OrgEntity.Create()); _userList = _nsiService.Users; _userList.Add(UserEntity.Create()); _tagList = _nsiService.Tags; _tagList.Add(TagEntity.Create()); _dialogResult = null; _control = new RequestEditControl(this); SetCaption(); _eventMgr.GetEvent <RequestChangedEvent>().Subscribe(OnRequestChanged); }
private void Subscribe() { _eventMgr.GetEvent <LoadSettingEvents>().Subscribe(OnLoadSetting); _eventMgr.GetEvent <SaveSettingEvents>().Subscribe(OnSaveSetting); }
void SubscribeEvent() { _eventMgr.GetEvent <FirstDbConnectEvent>().Subscribe(OnFirstDbConnect); _eventMgr.GetEvent <MainFormLoadedEvent>().Subscribe(OnMainFormLoaded); _eventMgr.GetEvent <MainFormClosedEvent>().Subscribe(OnMainFormClosed); _eventMgr.GetEvent <MainFormLoadSettingEvent>().Subscribe(OnLoadSetting); _eventMgr.GetEvent <MainFormSaveSettingEvent>().Subscribe(OnSaveSetting); }
void FireMainFormLoadedEvent() { _eventMgr.GetEvent <MainFormLoadedEvent>().Publish(new MainFormLoadedMessage()); }