refresh the form instead of doing full do-events. Much, much quicker that way.
This commit is contained in:
parent
fbfc1e148b
commit
b4e828162a
@ -524,6 +524,7 @@ namespace EduNetworkBuilder
|
|||||||
}
|
}
|
||||||
else if (MyMode == LBContents.regressiontest)
|
else if (MyMode == LBContents.regressiontest)
|
||||||
{
|
{
|
||||||
|
Console.WriteLine(" Test button pressed at " + DateTime.UtcNow.ToString());
|
||||||
if (lbWindowData.SelectedItem is MyPuzzleEntry)
|
if (lbWindowData.SelectedItem is MyPuzzleEntry)
|
||||||
{
|
{
|
||||||
MyPuzzleEntry MPE = (MyPuzzleEntry)lbWindowData.SelectedItem;
|
MyPuzzleEntry MPE = (MyPuzzleEntry)lbWindowData.SelectedItem;
|
||||||
@ -532,10 +533,14 @@ namespace EduNetworkBuilder
|
|||||||
BuilderWindow myWin = (BuilderWindow)Application.OpenForms["BuilderWindow"];
|
BuilderWindow myWin = (BuilderWindow)Application.OpenForms["BuilderWindow"];
|
||||||
if (myWin != null)
|
if (myWin != null)
|
||||||
{
|
{
|
||||||
|
Console.WriteLine(" Testing for replay at " + DateTime.UtcNow.ToString());
|
||||||
|
|
||||||
if (oursettings.HasReplay(TheName))
|
if (oursettings.HasReplay(TheName))
|
||||||
{
|
{
|
||||||
|
Console.WriteLine(" Replay found at " + DateTime.UtcNow.ToString());
|
||||||
//myWin.Activate();
|
//myWin.Activate();
|
||||||
FormColorForTesting();
|
FormColorForTesting();
|
||||||
|
Console.WriteLine(" Coloring finished at " + DateTime.UtcNow.ToString());
|
||||||
myWin.replayNetwork(TheName, 1);
|
myWin.replayNetwork(TheName, 1);
|
||||||
//Return back to the listbox window
|
//Return back to the listbox window
|
||||||
Visible = true;
|
Visible = true;
|
||||||
@ -558,17 +563,18 @@ namespace EduNetworkBuilder
|
|||||||
private void FormColorForTesting()
|
private void FormColorForTesting()
|
||||||
{
|
{
|
||||||
this.BackColor = Color.GreenYellow;
|
this.BackColor = Color.GreenYellow;
|
||||||
Application.DoEvents();
|
Refresh();
|
||||||
}
|
}
|
||||||
private void FormColorBackToNormal()
|
private void FormColorBackToNormal()
|
||||||
{
|
{
|
||||||
this.BackColor = SystemColors.Control;
|
this.BackColor = SystemColors.Control;
|
||||||
Application.DoEvents();
|
|
||||||
|
Refresh();
|
||||||
}
|
}
|
||||||
private void FormColorContinuingLoop()
|
private void FormColorContinuingLoop()
|
||||||
{
|
{
|
||||||
this.BackColor = Color.DarkGray;
|
this.BackColor = Color.DarkGray;
|
||||||
Application.DoEvents();
|
Refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
Loading…
Reference in New Issue
Block a user