Exemplo n.º 1
0
        protected override void OnDeactivate(bool close)
        {
            _eventAggregator?.Unsubscribe(this);

            if (_serviceHost?.State == CommunicationState.Opened)
            {
                _serviceHost.Close();
            }

            QuartzApkDkReglamentRegSh.Shutdown();

            base.OnDeactivate(close);
        }
Exemplo n.º 2
0
        protected override void OnInitialize()
        {
            try
            {
                _serviceHost?.Open();

                QuartzApkDkReglamentRegSh.Start(ApkDk, OwnerRailwayStations);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
            finally
            {
                base.OnInitialize();
            }
        }