Move Working on getting the listboxwindow not to disappear when we do regression testing
This commit is contained in:
parent
ead0d3511f
commit
6d3db35cfc
@ -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>
|
||||||
|
@ -14,38 +14,38 @@ using System.Resources;
|
|||||||
|
|
||||||
namespace EduNetworkBuilder
|
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
|
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 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;
|
||||||
|
@ -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
|
||||||
}
|
}
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user