/// <inheritdoc /> /// <summary> /// Shuts down Kore and closes all plugins and open files. /// </summary> public void Dispose() { foreach (var kfi in OpenFiles.Select(f => f)) { CloseFile(kfi); } }
/// <see cref="ISettings.Save"/> public void Save() { _settings.LastPath = LastDiagramLocation.FullName; _settings.GraphVizLocation = GraphVizExecutable.FullName; _settings.PlantUmlLocation = PlantUmlJar.FullName; _settings.RememberOpenFiles = RememberOpenFiles; var openFiles = new StringCollection(); openFiles.AddRange(OpenFiles.Select(file => file.FullName).ToArray()); _settings.OpenFiles = openFiles; _settings.MaximumRecentFiles = MaximumRecentFiles; var recentFiles = new StringCollection(); recentFiles.AddRange(RecentFiles.Select(file => file.FullName).ToArray()); _settings.RecentFiles = recentFiles; _settings.AutoSaveEnabled = AutoSaveEnabled; _settings.AutoSaveInterval = AutoSaveInterval; _settings.HighlightCurrentLine = HighlightCurrentLine; _settings.ShowLineNumbers = ShowLineNumbers; _settings.EnableVirtualSpace = EnableVirtualSpace; _settings.EnableWordWrap = EnableWordWrap; _settings.EmptySelectionCopiesEntireLine = EmptySelectionCopiesEntireLine; _settings.AllowScrollingBelowContent = AllowScrollingBelowContent; _settings.Save(); }
protected void OpenFilesCollectionChanged(object sender, NotifyCollectionChangedEventArgs e) { Settings set = SettingsManager.Load(); set.LastOpenedFiles.Clear(); set.LastOpenedFiles.AddRange(OpenFiles.Select(x => x.LoadedFile).ToList()); SettingsManager.Save(set); }