Add checkboxes for some fields we can filter on, and start tracking those valuse

This commit is contained in:
Tim Young 2018-09-21 11:23:30 -05:00
parent 6b8ab4907c
commit a63fec2a61

View File

@ -21,11 +21,27 @@ namespace EduNetworkBuilder
public string PuzzleName; public string PuzzleName;
public bool isdone = false; public bool isdone = false;
public string level = ""; public string level = "";
public bool InRegressionMode = false;
public bool HasTest = false;
public bool PassedTest = false;
public bool FailedTest = false;
public override string ToString() public override string ToString()
{ {
string donstr = ""; string donstr = "";
if (isdone) donstr = "* "; if (InRegressionMode)
return donstr + level + " " + this.Title; {
if (HasTest) donstr = "+ ";
else donstr = "- ";
if (PassedTest) donstr = "$ ";
if (FailedTest) donstr = "$ ";
return donstr + level + " " + this.Title;
}
else
{
if (isdone) donstr = "* ";
return donstr + level + " " + this.Title;
}
} }
} }
public partial class ListBoxWindow : Form public partial class ListBoxWindow : Form
@ -130,16 +146,13 @@ namespace EduNetworkBuilder
foreach (string str in NB.GetPuzzleTags()) foreach (string str in NB.GetPuzzleTags())
{ {
newCB = AddCheckBox(count, str); newCB = AddCheckBox(count, str);
if (str == SelectedTag || (SelectedTag == "ALL" && Regex.IsMatch(str, "Level")))
{
newCB.Checked = true; //The first level with an unsolved puzzle starts checked
}
else
{
newCB.Checked = false;
}
count++; count++;
} }
newCB = AddCheckBox(count++, "Test");
newCB = AddCheckBox(count++, "No Test");
newCB = AddCheckBox(count++, "Passed");
newCB = AddCheckBox(count++, "Failed");
panelCheckboxes.ResumeLayout(); panelCheckboxes.ResumeLayout();
btnOK.Text = NB.Translate("_Load"); btnOK.Text = NB.Translate("_Load");
btnAdd.Text = NB.Translate("_Cancel"); btnAdd.Text = NB.Translate("_Cancel");