private void OnClosed(object sender, EventArgs e) { _settingsService.CurrentThemeChanged -= OnCurrentThemeChanged; _settingsService.ApplicationSettingsChanged -= OnApplicationSettingsChanged; _settingsService.TerminalOptionsChanged -= OnTerminalOptionsChanged; _settingsService.ShellProfileAdded -= OnShellProfileAdded; _settingsService.ShellProfileDeleted -= OnShellProfileDeleted; _settingsService.SshProfileAdded -= OnSshProfileAdded; _settingsService.SshProfileDeleted -= OnSshProfileDeleted; ApplicationView.CloseRequested -= OnCloseRequest; ApplicationView.Closed -= OnClosed; Terminals.CollectionChanged -= OnTerminalsCollectionChanged; _keyboardCommandService.ClearCommandHandlers(); _applicationSettings = null; AddLocalShellCommand = null; AddSshShellCommand = null; AddQuickShellCommand = null; ShowAboutCommand = null; ShowSettingsCommand = null; Closed?.Invoke(this, e); }
private void OnClosed(object sender, EventArgs e) { MessengerInstance.Unregister(this); ApplicationView.CloseRequested -= OnCloseRequest; ApplicationView.Closed -= OnClosed; Terminals.CollectionChanged -= OnTerminalsCollectionChanged; _keyboardCommandService.ClearCommandHandlers(); _applicationSettings = null; AddDefaultTabCommand = null; Closed?.Invoke(this, e); }