From b7bef436d2d8afd37954fbb33c84c717059902c5 Mon Sep 17 00:00:00 2001 From: Tim Young Date: Thu, 15 Jun 2017 09:11:54 -0500 Subject: [PATCH] Mono does not create new RTF windows if the RTF window is already there. It ends up with old puzzle information instead of new info. Kill the RTF window when going from puzzle to puzzle. --- EduNetworkBuilder/Network.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/EduNetworkBuilder/Network.cs b/EduNetworkBuilder/Network.cs index 19191fc..b58f043 100644 --- a/EduNetworkBuilder/Network.cs +++ b/EduNetworkBuilder/Network.cs @@ -824,17 +824,18 @@ namespace EduNetworkBuilder if (answer == DialogResult.Yes) { + KillAllExtraWindows(true); ListBoxWindow LBW = new ListBoxWindow(); LBW.ShowDialog(); } } - void KillAllExtraWindows() + void KillAllExtraWindows(bool EvenRTF=false) { for(int i = Application.OpenForms.Count -1; i >=0; i--) { if (Application.OpenForms[i].Name == "BuilderWindow") continue; //We do not kill the builder window - if (Application.OpenForms[i].Name == "RTFWindow") continue; //We do not kill the rtf window + if (EvenRTF && Application.OpenForms[i].Name == "RTFWindow") continue; //We do not kill the rtf window Application.OpenForms[i].Hide(); //make them disappear Application.OpenForms[i].Close(); //actually close them }