From a63fec2a619f5ac1fde2f44acd1d8b43e0884df1 Mon Sep 17 00:00:00 2001 From: Tim Young Date: Fri, 21 Sep 2018 11:23:30 -0500 Subject: [PATCH] Add checkboxes for some fields we can filter on, and start tracking those valuse --- EduNetworkBuilder/ListBoxWindow.cs | 33 +++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/EduNetworkBuilder/ListBoxWindow.cs b/EduNetworkBuilder/ListBoxWindow.cs index 1549922..b1dfc62 100644 --- a/EduNetworkBuilder/ListBoxWindow.cs +++ b/EduNetworkBuilder/ListBoxWindow.cs @@ -21,11 +21,27 @@ namespace EduNetworkBuilder public string PuzzleName; public bool isdone = false; public string level = ""; + public bool InRegressionMode = false; + public bool HasTest = false; + public bool PassedTest = false; + public bool FailedTest = false; + public override string ToString() { string donstr = ""; - if (isdone) donstr = "* "; - return donstr + level + " " + this.Title; + if (InRegressionMode) + { + 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 @@ -130,16 +146,13 @@ namespace EduNetworkBuilder foreach (string str in NB.GetPuzzleTags()) { 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++; } + newCB = AddCheckBox(count++, "Test"); + newCB = AddCheckBox(count++, "No Test"); + newCB = AddCheckBox(count++, "Passed"); + newCB = AddCheckBox(count++, "Failed"); + panelCheckboxes.ResumeLayout(); btnOK.Text = NB.Translate("_Load"); btnAdd.Text = NB.Translate("_Cancel");