Move Working on getting the listboxwindow not to disappear when we do regression testing

This commit is contained in:
Tim Young 2018-09-27 14:41:10 -05:00
parent ead0d3511f
commit 6d3db35cfc
4 changed files with 40 additions and 34 deletions

View File

@ -112,7 +112,9 @@
<Compile Include="LinkEditor.Designer.cs"> <Compile Include="LinkEditor.Designer.cs">
<DependentUpon>LinkEditor.cs</DependentUpon> <DependentUpon>LinkEditor.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="ListBoxWindow.cs" /> <Compile Include="ListBoxWindow.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="ListBoxWindow.Designer.cs"> <Compile Include="ListBoxWindow.Designer.cs">
<DependentUpon>ListBoxWindow.cs</DependentUpon> <DependentUpon>ListBoxWindow.cs</DependentUpon>
</Compile> </Compile>

View File

@ -14,7 +14,8 @@ using System.Resources;
namespace EduNetworkBuilder namespace EduNetworkBuilder
{ {
public partial class ListBoxWindow : Form
{
class MyPuzzleEntry class MyPuzzleEntry
{ {
public string Title; public string Title;
@ -44,8 +45,7 @@ namespace EduNetworkBuilder
} }
} }
} }
public partial class ListBoxWindow : Form
{
protected LBContents MyMode = LBContents.messages; protected LBContents MyMode = LBContents.messages;
protected DebugLevel WhatToDisplay = DebugLevel.info; //used when viewing packet-messages protected DebugLevel WhatToDisplay = DebugLevel.info; //used when viewing packet-messages
NetworkDevice myNetDevice; NetworkDevice myNetDevice;
@ -506,11 +506,11 @@ namespace EduNetworkBuilder
{ {
MyPuzzleEntry MPE = (MyPuzzleEntry)lbWindowData.SelectedItem; MyPuzzleEntry MPE = (MyPuzzleEntry)lbWindowData.SelectedItem;
string TheName = MPE.PuzzleName; string TheName = MPE.PuzzleName;
Visible = false; //Visible = false;
BuilderWindow myWin = (BuilderWindow)Application.OpenForms["BuilderWindow"]; BuilderWindow myWin = (BuilderWindow)Application.OpenForms["BuilderWindow"];
if (myWin != null) if (myWin != null)
{ {
myWin.Activate(); //myWin.Activate();
myWin.replayNetwork(TheName, 1); myWin.replayNetwork(TheName, 1);
//Return back to the listbox window //Return back to the listbox window
Visible = true; Visible = true;

View File

@ -1357,6 +1357,7 @@ namespace EduNetworkBuilder
{ {
if (Application.OpenForms[i].Name == "BuilderWindow") continue; //We do not kill the builder window if (Application.OpenForms[i].Name == "BuilderWindow") continue; //We do not kill the builder window
if (EvenRTF && 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
//if (EvenRTF && Application.OpenForms[i].Name == "ListBoxWindow") continue; //Testing because listbox window is accidentally closed
Application.OpenForms[i].Hide(); //make them disappear Application.OpenForms[i].Hide(); //make them disappear
Application.OpenForms[i].Close(); //actually close them Application.OpenForms[i].Close(); //actually close them
} }

View File

@ -2968,8 +2968,11 @@ namespace EduNetworkBuilder
//We want to show dialog, but it needs to go to the background. After that, //We want to show dialog, but it needs to go to the background. After that,
//It returns from the show dialog. So we need to loop continuously until //It returns from the show dialog. So we need to loop continuously until
//It is completed. //It is completed.
DialogResult WhatHappened = DialogResult.Retry;
while (!LBW.ClosingRegression) while (!LBW.ClosingRegression)
LBW.ShowDialog(); {
WhatHappened = LBW.ShowDialog();
}
} }
#endregion #endregion