예제 #1
0
        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);
        }
예제 #2
0
        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);
        }