protected override void OnDeactivate(bool close) { _eventAggregator?.Unsubscribe(this); if (_serviceHost?.State == CommunicationState.Opened) { _serviceHost.Close(); } QuartzApkDkReglamentRegSh.Shutdown(); base.OnDeactivate(close); }
protected override void OnInitialize() { try { _serviceHost?.Open(); QuartzApkDkReglamentRegSh.Start(ApkDk, OwnerRailwayStations); } catch (Exception ex) { MessageBox.Show(ex.Message); } finally { base.OnInitialize(); } }