Add PuzzlesPassed and PuzzlesFailed to settings.

This commit is contained in:
Tim Young 2018-10-05 12:43:57 -05:00
parent 3865794d81
commit 47790c1de1
3 changed files with 49 additions and 1 deletions

View File

@ -23,6 +23,8 @@ namespace EduNetworkBuilder
public string LastPath = ""; public string LastPath = "";
public List<string> ScoreList = new List<string>(); public List<string> ScoreList = new List<string>();
public List<string> RecentFiles = new List<string>(); public List<string> RecentFiles = new List<string>();
public List<string> PuzzlesPassed = new List<string>();
public List<string> PuzzlesFailed = new List<string>();
public bool AutoStartPuzzles = true; public bool AutoStartPuzzles = true;
public string ChosenLanguage = "en"; public string ChosenLanguage = "en";
public bool LanguageHasBeenChosen = false; public bool LanguageHasBeenChosen = false;
@ -85,6 +87,10 @@ namespace EduNetworkBuilder
Properties.Settings.Default.ScoreList = new System.Collections.Specialized.StringCollection(); Properties.Settings.Default.ScoreList = new System.Collections.Specialized.StringCollection();
if (Properties.Settings.Default.RecentFiles == null) if (Properties.Settings.Default.RecentFiles == null)
Properties.Settings.Default.RecentFiles = new System.Collections.Specialized.StringCollection(); 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.LastPath = FromClass.LastPath;
ToClass.AutoStartPuzzles = FromClass.AutoStartPuzzles; ToClass.AutoStartPuzzles = FromClass.AutoStartPuzzles;
@ -108,6 +114,16 @@ namespace EduNetworkBuilder
if (!ToClass.RecentFiles.Contains(one)) if (!ToClass.RecentFiles.Contains(one))
ToClass.RecentFiles.Add(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) public NBSettings(bool UsingMono)
@ -138,6 +154,10 @@ namespace EduNetworkBuilder
Properties.Settings.Default.ScoreList = new System.Collections.Specialized.StringCollection(); Properties.Settings.Default.ScoreList = new System.Collections.Specialized.StringCollection();
if (Properties.Settings.Default.RecentFiles == null) if (Properties.Settings.Default.RecentFiles == null)
Properties.Settings.Default.RecentFiles = new System.Collections.Specialized.StringCollection(); 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; LastPath = Properties.Settings.Default.LastPath;
AutoStartPuzzles = Properties.Settings.Default.AutoStartPuzzles; AutoStartPuzzles = Properties.Settings.Default.AutoStartPuzzles;

View File

@ -12,7 +12,7 @@ namespace EduNetworkBuilder.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [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 { internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
@ -200,5 +200,27 @@ namespace EduNetworkBuilder.Properties {
this["FormTransLastDir"] = value; 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;
}
}
} }
} }

View File

@ -47,5 +47,11 @@
<Setting Name="FormTransLastDir" Type="System.String" Scope="User"> <Setting Name="FormTransLastDir" Type="System.String" Scope="User">
<Value Profile="(Default)" /> <Value Profile="(Default)" />
</Setting> </Setting>
<Setting Name="PuzzlesPassed" Type="System.Collections.Specialized.StringCollection" Scope="User">
<Value Profile="(Default)" />
</Setting>
<Setting Name="PuzzlesFailed" Type="System.Collections.Specialized.StringCollection" Scope="User">
<Value Profile="(Default)" />
</Setting>
</Settings> </Settings>
</SettingsFile> </SettingsFile>