예제 #1
0
        private void FireComandExecutedEvent(string commandText, bool result)
        {
            if (_eventMgr == null)
            {
                return;
            }
            DbCommandExecutedMessage message = new DbCommandExecutedMessage(commandText, result);

            _eventMgr.GetEvent <DbCommandExecutedEvent>().Publish(message);
        }
예제 #2
0
        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);
        }
예제 #3
0
        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);
        }
예제 #4
0
        void FireLoadSettingEvent()
        {
            if (!IsConnectWithMessage)
            {
                return;
            }

            ServiceMgr.Current.GetInstance <IMessageBoxMgr>().ShowAndHideWaitScreen(() =>
                                                                                    { _eventMgr.GetEvent <MainFormLoadSettingEvent>().Publish(null); },
                                                                                    "Зачекайте, будь ласка",
                                                                                    "Завантаження настроювань");
        }
예제 #5
0
        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();
        }
예제 #6
0
        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);
        }
예제 #7
0
 private void Subscribe()
 {
     _eventMgr.GetEvent <LoadSettingEvents>().Subscribe(OnLoadSetting);
     _eventMgr.GetEvent <SaveSettingEvents>().Subscribe(OnSaveSetting);
 }
예제 #8
0
 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);
 }
예제 #9
0
 void FireMainFormLoadedEvent()
 {
     _eventMgr.GetEvent <MainFormLoadedEvent>().Publish(new MainFormLoadedMessage());
 }