Some windows need killing when a puzzle is complete. Close all extra windows.
This commit is contained in:
parent
49be222b5d
commit
5912e1244f
@ -817,14 +817,30 @@ namespace EduNetworkBuilder
|
||||
Properties.Settings.Default.Save();
|
||||
}
|
||||
}
|
||||
//kill all extra windows that no longer need to be open.
|
||||
KillAllExtraWindows();
|
||||
|
||||
DialogResult answer = MessageBox.Show(NB.Translate("N_MarkAsSolvedDone"),NB.Translate("_Solved"),MessageBoxButtons.YesNo);
|
||||
if(answer == DialogResult.Yes)
|
||||
|
||||
if (answer == DialogResult.Yes)
|
||||
{
|
||||
ListBoxWindow LBW = new ListBoxWindow();
|
||||
LBW.ShowDialog();
|
||||
}
|
||||
}
|
||||
|
||||
void KillAllExtraWindows()
|
||||
{
|
||||
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
|
||||
Application.OpenForms[i].Hide(); //make them disappear
|
||||
Application.OpenForms[i].Close(); //actually close them
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// See if we have any tests that are supposed to check for packet arrival.
|
||||
/// </summary>
|
||||
|
Loading…
Reference in New Issue
Block a user