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">
<DependentUpon>LinkEditor.cs</DependentUpon>
</Compile>
<Compile Include="ListBoxWindow.cs" />
<Compile Include="ListBoxWindow.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="ListBoxWindow.Designer.cs">
<DependentUpon>ListBoxWindow.cs</DependentUpon>
</Compile>

View File

@ -14,38 +14,38 @@ using System.Resources;
namespace EduNetworkBuilder
{
class MyPuzzleEntry
{
public string Title;
public string PuzzleName;
public bool isdone = false;
public string level = "";
public bool InRegressionMode = false;
public bool HasTest = false;
public bool PassedTest = false;
public bool FailedTest = false;
public override string ToString()
{
string donstr = "";
if (InRegressionMode)
{
if (HasTest) donstr = "+ ";
else donstr = "- ";
if (PassedTest) donstr = "$ ";
if (FailedTest) donstr = "$ ";
return donstr + level + " " + this.Title;
}
else
{
if (isdone) donstr = "* ";
return donstr + level + " " + this.Title;
}
}
}
public partial class ListBoxWindow : Form
{
class MyPuzzleEntry
{
public string Title;
public string PuzzleName;
public bool isdone = false;
public string level = "";
public bool InRegressionMode = false;
public bool HasTest = false;
public bool PassedTest = false;
public bool FailedTest = false;
public override string ToString()
{
string donstr = "";
if (InRegressionMode)
{
if (HasTest) donstr = "+ ";
else donstr = "- ";
if (PassedTest) donstr = "$ ";
if (FailedTest) donstr = "$ ";
return donstr + level + " " + this.Title;
}
else
{
if (isdone) donstr = "* ";
return donstr + level + " " + this.Title;
}
}
}
protected LBContents MyMode = LBContents.messages;
protected DebugLevel WhatToDisplay = DebugLevel.info; //used when viewing packet-messages
NetworkDevice myNetDevice;
@ -506,11 +506,11 @@ namespace EduNetworkBuilder
{
MyPuzzleEntry MPE = (MyPuzzleEntry)lbWindowData.SelectedItem;
string TheName = MPE.PuzzleName;
Visible = false;
//Visible = false;
BuilderWindow myWin = (BuilderWindow)Application.OpenForms["BuilderWindow"];
if (myWin != null)
{
myWin.Activate();
//myWin.Activate();
myWin.replayNetwork(TheName, 1);
//Return back to the listbox window
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 (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].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,
//It returns from the show dialog. So we need to loop continuously until
//It is completed.
DialogResult WhatHappened = DialogResult.Retry;
while (!LBW.ClosingRegression)
LBW.ShowDialog();
{
WhatHappened = LBW.ShowDialog();
}
}
#endregion