give a nice message when the random puzzle is solved.
This commit is contained in:
parent
7908de2fe3
commit
ec6dbe0c3f
@ -67,6 +67,7 @@ namespace EduNetworkBuilder
|
||||
private List<Image> PacketImages = new List<Image>();
|
||||
private List<PingTestStatus> PingTestStats = new List<PingTestStatus>();
|
||||
private List<string> BrokenItems = new List<string>();
|
||||
public bool IsRandomNetwork = false;
|
||||
|
||||
/// <summary>
|
||||
/// WhatFrom: If we are launched from a homework, we remember it here.
|
||||
@ -180,6 +181,7 @@ namespace EduNetworkBuilder
|
||||
int newUnique=-1;
|
||||
PuzzleName = Name;
|
||||
LoadedFromResource = FromResource;
|
||||
IsRandomNetwork = false; //right now, it is set up from disk. We set this when we randomize the network
|
||||
foreach (XmlNode Individual in TheNode.ChildNodes)
|
||||
{
|
||||
XmlNodeType myNodetype = Individual.NodeType;
|
||||
@ -940,13 +942,21 @@ namespace EduNetworkBuilder
|
||||
|
||||
if (WhatFrom == null)
|
||||
{
|
||||
DialogResult answer = MessageBox.Show(NB.Translate("N_MarkAsSolvedDone"), NB.Translate("_Solved"), MessageBoxButtons.YesNo);
|
||||
|
||||
if (answer == DialogResult.Yes)
|
||||
if (!IsRandomNetwork)
|
||||
{
|
||||
KillAllExtraWindows(true);
|
||||
ListBoxWindow LBW = new ListBoxWindow();
|
||||
LBW.ShowDialog();
|
||||
DialogResult answer = MessageBox.Show(NB.Translate("N_MarkAsSolvedDone"), NB.Translate("_Solved"), MessageBoxButtons.YesNo);
|
||||
|
||||
if (answer == DialogResult.Yes)
|
||||
{
|
||||
KillAllExtraWindows(true);
|
||||
ListBoxWindow LBW = new ListBoxWindow();
|
||||
LBW.ShowDialog();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//It was a randomly generated puzzle. Let them know it was solved. But we do not auto-load a new one.
|
||||
MessageBox.Show(NB.Translate("N_MarkRandomAsSolvedDone"), NB.Translate("_Solved"), MessageBoxButtons.OK);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -52,7 +52,7 @@ namespace EduNetworkBuilder
|
||||
private NetworkDevice ItemClickedOn = null;
|
||||
private List<NetworkDevice> ItemsSelected = new List<NetworkDevice>();
|
||||
private Point OrigClickPoint = new Point(-1, -1);
|
||||
|
||||
|
||||
private string InitialFileLoad = "";
|
||||
|
||||
public PersonClass CurrentUser;
|
||||
@ -2179,7 +2179,8 @@ namespace EduNetworkBuilder
|
||||
|
||||
myNetwork.StartingHelpLevel = NetTestVerbosity.full;
|
||||
myNetwork.HintsToDisplay = NetTestVerbosity.full;
|
||||
|
||||
myNetwork.IsRandomNetwork = true;
|
||||
myNetwork.PuzzleIsSolved = false;
|
||||
myNetwork.NonVisualDoDHCPOnAll();
|
||||
List<TraversalClass> TraversalCollection = new List<TraversalClass>();
|
||||
|
||||
|
@ -1929,6 +1929,10 @@
|
||||
<value>Internet</value>
|
||||
<comment>NB_InternetHomeAndOffice = Internet</comment>
|
||||
</data>
|
||||
<data name="N_MarkRandomAsSolvedDone" xml:space="preserve">
|
||||
<value>You have completed the randomly broken puzzle. Congratulations!</value>
|
||||
<comment>N_MarkRandomAsSolvedDone = You have completed the randomly broken puzzle. Congratulations!</comment>
|
||||
</data>
|
||||
<data name="Options_Caption_full" xml:space="preserve">
|
||||
<value>Full</value>
|
||||
<comment>Options_Caption_full = Full</comment>
|
||||
|
Loading…
Reference in New Issue
Block a user