Save the level we are working on
This commit is contained in:
@ -151,14 +151,26 @@ namespace EduNetworkBuilder
|
||||
if (Properties.Settings.Default.ScoreList == null)
|
||||
Properties.Settings.Default.ScoreList = new System.Collections.Specialized.StringCollection();
|
||||
PuzzleInfo PI;
|
||||
string first = "";
|
||||
|
||||
string OriginalChoice = Properties.Settings.Default.ProcessingLevel;
|
||||
if(OriginalChoice != null)
|
||||
{
|
||||
if (NB.PuzzleLevelHasUnsolved(OriginalChoice))
|
||||
return OriginalChoice;
|
||||
}
|
||||
|
||||
foreach (string str in NB.GetPuzzleNames())
|
||||
{
|
||||
if(!Properties.Settings.Default.ScoreList.Contains(str))
|
||||
{
|
||||
PI = NB.GetPuzzleInfoFromName(str);
|
||||
return "Level_" + PI.Level;
|
||||
first = "Level_" + PI.Level;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (first != "")
|
||||
return first;
|
||||
return NB.Translate("_All");
|
||||
}
|
||||
|
||||
@ -308,6 +320,28 @@ namespace EduNetworkBuilder
|
||||
{
|
||||
processing = true;
|
||||
DebugLevel toFind;
|
||||
int mycount = 0;
|
||||
string labelname = "";
|
||||
if (MyMode == LBContents.puzzles)
|
||||
{
|
||||
foreach (Control mycontrol in panelCheckboxes.Controls)
|
||||
{
|
||||
//pull out the name
|
||||
CheckBox cb = (CheckBox)mycontrol;
|
||||
//make an enum. See if that is set. If so, mark it as checked
|
||||
if (cb.Checked)
|
||||
{
|
||||
mycount++;
|
||||
labelname = mycontrol.Text;
|
||||
}
|
||||
}
|
||||
if (mycount == 1)
|
||||
{
|
||||
//We only have one item checked. Store this value for later
|
||||
Properties.Settings.Default.ProcessingLevel = labelname;
|
||||
Properties.Settings.Default.Save();
|
||||
}
|
||||
}
|
||||
if (MyMode == LBContents.messages)
|
||||
{
|
||||
foreach (Control mycontrol in panelCheckboxes.Controls)
|
||||
@ -319,6 +353,8 @@ namespace EduNetworkBuilder
|
||||
if ((toFind & WhatToDisplay) == toFind)
|
||||
{
|
||||
cb.Checked = true;
|
||||
labelname = mycontrol.Text;
|
||||
mycount++;
|
||||
}
|
||||
else //If not, mark it as not checked.
|
||||
{
|
||||
|
Reference in New Issue
Block a user