From 375ea625a6461647efbe8cb8acb39aa4c8348c0c Mon Sep 17 00:00:00 2001 From: Tim Young Date: Fri, 21 Sep 2018 13:11:05 -0500 Subject: [PATCH] filter for passed / failed --- EduNetworkBuilder/ListBoxWindow.cs | 4 ++-- EduNetworkBuilder/NBSettings.cs | 15 ++++++++++++++- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/EduNetworkBuilder/ListBoxWindow.cs b/EduNetworkBuilder/ListBoxWindow.cs index 47f9772..4173385 100644 --- a/EduNetworkBuilder/ListBoxWindow.cs +++ b/EduNetworkBuilder/ListBoxWindow.cs @@ -416,8 +416,8 @@ namespace EduNetworkBuilder List tags = new List(pi.PuzzleTags); if(oursettings.HasReplay(puzzle_name)) tags.Add(TestString); else tags.Add(NoTestString); - //tags.Add(PassedString); - //tags.Add(FailedString); + if (oursettings.HasPassed(puzzle_name)) tags.Add(PassedString); + if (oursettings.HasFailed(puzzle_name)) tags.Add(FailedString); foreach (string tag in tags) { if (isChecked(tag)) diff --git a/EduNetworkBuilder/NBSettings.cs b/EduNetworkBuilder/NBSettings.cs index bbf7553..51f04d6 100644 --- a/EduNetworkBuilder/NBSettings.cs +++ b/EduNetworkBuilder/NBSettings.cs @@ -178,7 +178,20 @@ namespace EduNetworkBuilder if (NA == null) return false; return true; } - + public bool HasPassed(string networkname) + { + if (UserActions == null) return false; + NetworkAction NA = UserActions.FindAction(networkname); + if (NA == null) return false; + return NA.HasPassed; + } + public bool HasFailed(string networkname) + { + if (UserActions == null) return false; + NetworkAction NA = UserActions.FindAction(networkname); + if (NA == null) return false; + return NA.HasFailed; + } public void SetPassed(string networkname) { if (UserActions == null) return;