Allow us to ctrl-alt click a puzzle and mark it as solved. This is used often when I am testing them.

This commit is contained in:
Tim Young 2017-06-19 13:39:22 -05:00
parent 64ff7a72ed
commit 2d90ad51b8

View File

@ -506,6 +506,27 @@ namespace EduNetworkBuilder
{ {
if(MyMode == LBContents.puzzles) if(MyMode == LBContents.puzzles)
{ {
if ((Form.ModifierKeys & Keys.Control) == Keys.Control && (Form.ModifierKeys & Keys.Alt) == Keys.Alt)
{
//We are control + alt clicking on something
if (lbWindowData.SelectedItem != null)
{
string TheName = lbWindowData.SelectedItem.ToString();
TheName = Regex.Replace(TheName, @"^\* ", "");
//If the puzzle is solved, mark it as unsolved.
//If it is unsolved, mark it as solved.
NBSettings oursettings = NB.GetSettings();
if(oursettings != null)
{
if (oursettings.ScoreList.Contains(TheName))
{
oursettings.ScoreList.Remove(TheName);
}
else
oursettings.ScoreList.Add(TheName);
}
}
}
UpdateForm(); UpdateForm();
} }
} }