From 47790c1de1b6a31881f3453262260c032ef94c28 Mon Sep 17 00:00:00 2001 From: Tim Young Date: Fri, 5 Oct 2018 12:43:57 -0500 Subject: [PATCH] Add PuzzlesPassed and PuzzlesFailed to settings. --- EduNetworkBuilder/NBSettings.cs | 20 ++++++++++++++++ .../Properties/Settings.Designer.cs | 24 ++++++++++++++++++- .../Properties/Settings.settings | 6 +++++ 3 files changed, 49 insertions(+), 1 deletion(-) diff --git a/EduNetworkBuilder/NBSettings.cs b/EduNetworkBuilder/NBSettings.cs index babd4bf..345fee4 100644 --- a/EduNetworkBuilder/NBSettings.cs +++ b/EduNetworkBuilder/NBSettings.cs @@ -23,6 +23,8 @@ namespace EduNetworkBuilder public string LastPath = ""; public List ScoreList = new List(); public List RecentFiles = new List(); + public List PuzzlesPassed = new List(); + public List PuzzlesFailed = new List(); public bool AutoStartPuzzles = true; public string ChosenLanguage = "en"; public bool LanguageHasBeenChosen = false; @@ -85,6 +87,10 @@ namespace EduNetworkBuilder Properties.Settings.Default.ScoreList = new System.Collections.Specialized.StringCollection(); if (Properties.Settings.Default.RecentFiles == null) Properties.Settings.Default.RecentFiles = new System.Collections.Specialized.StringCollection(); + if (Properties.Settings.Default.PuzzlesFailed == null) + Properties.Settings.Default.PuzzlesFailed = new System.Collections.Specialized.StringCollection(); + if (Properties.Settings.Default.PuzzlesPassed == null) + Properties.Settings.Default.PuzzlesPassed = new System.Collections.Specialized.StringCollection(); ToClass.LastPath = FromClass.LastPath; ToClass.AutoStartPuzzles = FromClass.AutoStartPuzzles; @@ -108,6 +114,16 @@ namespace EduNetworkBuilder if (!ToClass.RecentFiles.Contains(one)) ToClass.RecentFiles.Add(one); } + foreach (string one in FromClass.PuzzlesPassed) + { + if (!ToClass.PuzzlesPassed.Contains(one)) + ToClass.PuzzlesPassed.Add(one); + } + foreach (string one in FromClass.PuzzlesFailed) + { + if (!ToClass.PuzzlesFailed.Contains(one)) + ToClass.PuzzlesFailed.Add(one); + } } public NBSettings(bool UsingMono) @@ -138,6 +154,10 @@ namespace EduNetworkBuilder Properties.Settings.Default.ScoreList = new System.Collections.Specialized.StringCollection(); if (Properties.Settings.Default.RecentFiles == null) Properties.Settings.Default.RecentFiles = new System.Collections.Specialized.StringCollection(); + if (Properties.Settings.Default.PuzzlesFailed == null) + Properties.Settings.Default.PuzzlesFailed = new System.Collections.Specialized.StringCollection(); + if (Properties.Settings.Default.PuzzlesPassed == null) + Properties.Settings.Default.PuzzlesPassed = new System.Collections.Specialized.StringCollection(); LastPath = Properties.Settings.Default.LastPath; AutoStartPuzzles = Properties.Settings.Default.AutoStartPuzzles; diff --git a/EduNetworkBuilder/Properties/Settings.Designer.cs b/EduNetworkBuilder/Properties/Settings.Designer.cs index 43a5f69..e7b0d2c 100644 --- a/EduNetworkBuilder/Properties/Settings.Designer.cs +++ b/EduNetworkBuilder/Properties/Settings.Designer.cs @@ -12,7 +12,7 @@ namespace EduNetworkBuilder.Properties { [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.1.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.5.0.0")] internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); @@ -200,5 +200,27 @@ namespace EduNetworkBuilder.Properties { this["FormTransLastDir"] = value; } } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public global::System.Collections.Specialized.StringCollection PuzzlesPassed { + get { + return ((global::System.Collections.Specialized.StringCollection)(this["PuzzlesPassed"])); + } + set { + this["PuzzlesPassed"] = value; + } + } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public global::System.Collections.Specialized.StringCollection PuzzlesFailed { + get { + return ((global::System.Collections.Specialized.StringCollection)(this["PuzzlesFailed"])); + } + set { + this["PuzzlesFailed"] = value; + } + } } } diff --git a/EduNetworkBuilder/Properties/Settings.settings b/EduNetworkBuilder/Properties/Settings.settings index f2f8f15..e65f3b9 100644 --- a/EduNetworkBuilder/Properties/Settings.settings +++ b/EduNetworkBuilder/Properties/Settings.settings @@ -47,5 +47,11 @@ + + + + + + \ No newline at end of file