diff --git a/EduNetworkBuilder/NBSettings.cs b/EduNetworkBuilder/NBSettings.cs index ccd70a1..816ab27 100644 --- a/EduNetworkBuilder/NBSettings.cs +++ b/EduNetworkBuilder/NBSettings.cs @@ -107,6 +107,21 @@ namespace EduNetworkBuilder } } + public void MarkAsDone(string PuzzleName) + { + PersonClass PC = NB.GetUser(); + if(PC != null) + { + PC.MarkAsDone(PuzzleName); //Mark it on the user's personal settings. + } + //we just mark it in the settings class + if (!ScoreList.Contains(PuzzleName)) + { + ScoreList.Add(PuzzleName); + Save(); + } + } + public static string GetFilename() { string BaseDir = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData); diff --git a/EduNetworkBuilder/Network.cs b/EduNetworkBuilder/Network.cs index 76aedbd..7d62696 100644 --- a/EduNetworkBuilder/Network.cs +++ b/EduNetworkBuilder/Network.cs @@ -881,11 +881,7 @@ namespace EduNetworkBuilder if (PuzzleName != "" && PuzzleName != null) { NBSettings oursettings = NB.GetSettings(); - if (!oursettings.ScoreList.Contains(PuzzleName)) - { - oursettings.ScoreList.Add(PuzzleName); - oursettings.Save(); - } + oursettings.MarkAsDone(PuzzleName); } } //kill all extra windows that no longer need to be open. diff --git a/EduNetworkBuilder/PersonClass.cs b/EduNetworkBuilder/PersonClass.cs index fe6a16d..88320e1 100644 --- a/EduNetworkBuilder/PersonClass.cs +++ b/EduNetworkBuilder/PersonClass.cs @@ -178,5 +178,13 @@ namespace EduNetworkBuilder writer.WriteEndElement(); } #endregion + + public void MarkAsDone(string PuzzleName) + { + if (!EverCompletedPuzzles.Contains(PuzzleName)) + { + EverCompletedPuzzles.Add(PuzzleName); + } + } } }