stop displaying spurious help messages & pop open help when we launch a network
This commit is contained in:
parent
e5512b06b0
commit
3a7a3f4299
@ -96,6 +96,7 @@ namespace EduNetworkBuilder
|
|||||||
|
|
||||||
public static void Clone(Network source, Network dest)
|
public static void Clone(Network source, Network dest)
|
||||||
{
|
{
|
||||||
|
dest.AlreadyDisplayedMessage = false;
|
||||||
dest.DefaultTimeout = source.DefaultTimeout;
|
dest.DefaultTimeout = source.DefaultTimeout;
|
||||||
dest.HintsToDisplay = source.HintsToDisplay;
|
dest.HintsToDisplay = source.HintsToDisplay;
|
||||||
dest.itemsize = source.itemsize;
|
dest.itemsize = source.itemsize;
|
||||||
@ -161,7 +162,7 @@ namespace EduNetworkBuilder
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Load(XmlNode TheNode, string Name, bool FromResource=false)
|
public void Load(XmlNode TheNode, string Name, bool FromResource=false, bool skipOpeningWindows = false)
|
||||||
{
|
{
|
||||||
_isDirty = true;
|
_isDirty = true;
|
||||||
NetworkDevice newND;
|
NetworkDevice newND;
|
||||||
@ -277,7 +278,17 @@ namespace EduNetworkBuilder
|
|||||||
}
|
}
|
||||||
DoAllVerifyLinks();
|
DoAllVerifyLinks();
|
||||||
DoAllAutoJoin();
|
DoAllAutoJoin();
|
||||||
if (NetMessage.GetText() != "" && !AlreadyDisplayedMessage)
|
OpenHelpIfNeeded(skipOpeningWindows);
|
||||||
|
if (NetTests.Count > 0)
|
||||||
|
PuzzleIsSolved = false; //When we load the puzzle.
|
||||||
|
|
||||||
|
if (newUnique != -1)
|
||||||
|
UniqueIdentifier = newUnique;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void OpenHelpIfNeeded(bool skipOpeningWindows)
|
||||||
|
{
|
||||||
|
if (NetMessage.GetText() != "" && !AlreadyDisplayedMessage & !skipOpeningWindows)
|
||||||
{
|
{
|
||||||
//We have a message loaded on this network. Display it
|
//We have a message loaded on this network. Display it
|
||||||
BuilderWindow myWin = (BuilderWindow)Application.OpenForms["BuilderWindow"];
|
BuilderWindow myWin = (BuilderWindow)Application.OpenForms["BuilderWindow"];
|
||||||
@ -291,14 +302,8 @@ namespace EduNetworkBuilder
|
|||||||
}
|
}
|
||||||
AlreadyDisplayedMessage = true;
|
AlreadyDisplayedMessage = true;
|
||||||
}
|
}
|
||||||
if(NetTests.Count > 0)
|
|
||||||
PuzzleIsSolved = false; //When we load the puzzle.
|
|
||||||
|
|
||||||
if (newUnique != -1)
|
|
||||||
UniqueIdentifier = newUnique;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void Save()
|
public void Save()
|
||||||
{
|
{
|
||||||
Save(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Desktop), "Test.enbx"));
|
Save(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Desktop), "Test.enbx"));
|
||||||
|
@ -1585,6 +1585,7 @@ namespace EduNetworkBuilder
|
|||||||
{
|
{
|
||||||
PrepForLoad();
|
PrepForLoad();
|
||||||
Network.Clone(NewNet, myNetwork); //Push the settings
|
Network.Clone(NewNet, myNetwork); //Push the settings
|
||||||
|
myNetwork.OpenHelpIfNeeded(false);
|
||||||
UpdateMenu();
|
UpdateMenu();
|
||||||
UpdateForm();
|
UpdateForm();
|
||||||
}
|
}
|
||||||
|
@ -103,7 +103,7 @@ namespace EduNetworkBuilder
|
|||||||
break;
|
break;
|
||||||
case "network":
|
case "network":
|
||||||
theProject = new Network();
|
theProject = new Network();
|
||||||
theProject.Load(Individual, "");
|
theProject.Load(Individual, "",false,true);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user