protected override void OnClosing(CancelEventArgs e) { AppConfiguration.Instance.ClientX = this.Left; AppConfiguration.Instance.ClientY = this.Top; //save window position base.OnClosing(e); //stop timer _updateTimer.Stop(); Stop(); if (_audioPreview != null) { _audioPreview.StopEncoding(); _audioPreview = null; } _radioOverlayWindow?.Close(); _radioOverlayWindow = null; _dcsAutoConnectListener.Stop(); _dcsAutoConnectListener = null; }
protected override void OnClosing(CancelEventArgs e) { _settings.SetPositionSetting(SettingsKeys.ClientX, Left); _settings.SetPositionSetting(SettingsKeys.ClientY, Top); //save window position base.OnClosing(e); //stop timer _updateTimer.Stop(); Stop(); if (_audioPreview != null) { _audioPreview.StopEncoding(); _audioPreview = null; } _radioOverlayWindow?.Close(); _radioOverlayWindow = null; _awacsRadioOverlay?.Close(); _awacsRadioOverlay = null; _dcsAutoConnectListener.Stop(); _dcsAutoConnectListener = null; }