From 78c4af5b8d6767d04cb47cfe5ac2f1517c7021eb Mon Sep 17 00:00:00 2001 From: Tim Young Date: Mon, 1 Oct 2018 15:29:30 -0500 Subject: [PATCH] Change colors of window so we know we are doing testing. --- EduNetworkBuilder/ListBoxWindow.cs | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/EduNetworkBuilder/ListBoxWindow.cs b/EduNetworkBuilder/ListBoxWindow.cs index d25df83..f10dffb 100644 --- a/EduNetworkBuilder/ListBoxWindow.cs +++ b/EduNetworkBuilder/ListBoxWindow.cs @@ -534,15 +534,19 @@ namespace EduNetworkBuilder if (oursettings.HasReplay(TheName)) { //myWin.Activate(); + FormColorForTesting(); myWin.replayNetwork(TheName, 1); //Return back to the listbox window Visible = true; Activate(); + FormColorBackToNormal(); } else { if (lbWindowData.SelectedItem != null) + { NB.LoadNetworkFromResource(TheName); + } } } } @@ -550,6 +554,22 @@ namespace EduNetworkBuilder else Close(); } + private void FormColorForTesting() + { + this.BackColor = Color.GreenYellow; + Application.DoEvents(); + } + private void FormColorBackToNormal() + { + this.BackColor = SystemColors.Control; + Application.DoEvents(); + } + private void FormColorContinuingLoop() + { + this.BackColor = Color.DarkGray; + Application.DoEvents(); + } + /// /// The checkmark was changed. Tally up everything /// @@ -693,15 +713,18 @@ namespace EduNetworkBuilder if (myWin != null) { //myWin.Activate(); + FormColorForTesting(); myWin.replayNetwork(OnePuzzle, 1); //Return back to the listbox window Visible = true; Activate(); + FormColorContinuingLoop(); } break; } } } + FormColorBackToNormal(); }