Mark puzzles as done in the user file
This commit is contained in:
parent
364858d07c
commit
1ab8e0e0fb
@ -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);
|
||||
|
@ -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.
|
||||
|
@ -178,5 +178,13 @@ namespace EduNetworkBuilder
|
||||
writer.WriteEndElement();
|
||||
}
|
||||
#endregion
|
||||
|
||||
public void MarkAsDone(string PuzzleName)
|
||||
{
|
||||
if (!EverCompletedPuzzles.Contains(PuzzleName))
|
||||
{
|
||||
EverCompletedPuzzles.Add(PuzzleName);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user