From 864c697f8ec481202ccc23c5d63f3e095fc67d33 Mon Sep 17 00:00:00 2001 From: Tim Young Date: Fri, 21 Sep 2018 13:01:24 -0500 Subject: [PATCH] filter by test / notest --- EduNetworkBuilder/ListBoxWindow.cs | 11 ++++++++--- EduNetworkBuilder/NB.cs | 1 + 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/EduNetworkBuilder/ListBoxWindow.cs b/EduNetworkBuilder/ListBoxWindow.cs index 4d8ab52..47f9772 100644 --- a/EduNetworkBuilder/ListBoxWindow.cs +++ b/EduNetworkBuilder/ListBoxWindow.cs @@ -241,7 +241,7 @@ namespace EduNetworkBuilder if(!oursettings.ScoreList.Contains(str)) { PI = NB.GetPuzzleInfoFromName(str); - first = "Level_" + PI.Level; + first = PI.strLevel; break; } } @@ -413,7 +413,12 @@ namespace EduNetworkBuilder { wasfinished = true; } - foreach (string tag in pi.PuzzleTags) + List tags = new List(pi.PuzzleTags); + if(oursettings.HasReplay(puzzle_name)) tags.Add(TestString); + else tags.Add(NoTestString); + //tags.Add(PassedString); + //tags.Add(FailedString); + foreach (string tag in tags) { if (isChecked(tag)) { @@ -421,7 +426,7 @@ namespace EduNetworkBuilder MPE.PuzzleName = puzzle_name; MPE.Title = shown_name; MPE.isdone = wasfinished; - MPE.level = tag; + MPE.level = pi.strLevel; MPE.InRegressionMode = true; MPE.HasTest = oursettings.HasReplay(puzzle_name); if (selected == "" && !wasfinished) selected = shown_name; //Select the first unfinished puzzle diff --git a/EduNetworkBuilder/NB.cs b/EduNetworkBuilder/NB.cs index 9cc2088..d109a06 100644 --- a/EduNetworkBuilder/NB.cs +++ b/EduNetworkBuilder/NB.cs @@ -236,6 +236,7 @@ namespace EduNetworkBuilder public string PuzzleDescription; public List PuzzleTags = new List(); public int Level=0; + public string strLevel { get { return "Level_" + Level; } } public double SortOrder=0; public LanguageStrings NetMessage; public LanguageStrings NetTitle;