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<Image> PacketImages = new List<Image>();
|
||||||
private List<PingTestStatus> PingTestStats = new List<PingTestStatus>();
|
private List<PingTestStatus> PingTestStats = new List<PingTestStatus>();
|
||||||
private List<string> BrokenItems = new List<string>();
|
private List<string> BrokenItems = new List<string>();
|
||||||
|
public bool IsRandomNetwork = false;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// WhatFrom: If we are launched from a homework, we remember it here.
|
/// WhatFrom: If we are launched from a homework, we remember it here.
|
||||||
@ -180,6 +181,7 @@ namespace EduNetworkBuilder
|
|||||||
int newUnique=-1;
|
int newUnique=-1;
|
||||||
PuzzleName = Name;
|
PuzzleName = Name;
|
||||||
LoadedFromResource = FromResource;
|
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)
|
foreach (XmlNode Individual in TheNode.ChildNodes)
|
||||||
{
|
{
|
||||||
XmlNodeType myNodetype = Individual.NodeType;
|
XmlNodeType myNodetype = Individual.NodeType;
|
||||||
@ -939,6 +941,8 @@ namespace EduNetworkBuilder
|
|||||||
KillAllExtraWindows();
|
KillAllExtraWindows();
|
||||||
|
|
||||||
if (WhatFrom == null)
|
if (WhatFrom == null)
|
||||||
|
{
|
||||||
|
if (!IsRandomNetwork)
|
||||||
{
|
{
|
||||||
DialogResult answer = MessageBox.Show(NB.Translate("N_MarkAsSolvedDone"), NB.Translate("_Solved"), MessageBoxButtons.YesNo);
|
DialogResult answer = MessageBox.Show(NB.Translate("N_MarkAsSolvedDone"), NB.Translate("_Solved"), MessageBoxButtons.YesNo);
|
||||||
|
|
||||||
@ -950,6 +954,12 @@ namespace EduNetworkBuilder
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
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
|
||||||
{
|
{
|
||||||
PersonClass CurrentUser = NB.GetUser();
|
PersonClass CurrentUser = NB.GetUser();
|
||||||
if (CurrentUser != null && CurrentUser.isAdmin)
|
if (CurrentUser != null && CurrentUser.isAdmin)
|
||||||
|
@ -2179,7 +2179,8 @@ namespace EduNetworkBuilder
|
|||||||
|
|
||||||
myNetwork.StartingHelpLevel = NetTestVerbosity.full;
|
myNetwork.StartingHelpLevel = NetTestVerbosity.full;
|
||||||
myNetwork.HintsToDisplay = NetTestVerbosity.full;
|
myNetwork.HintsToDisplay = NetTestVerbosity.full;
|
||||||
|
myNetwork.IsRandomNetwork = true;
|
||||||
|
myNetwork.PuzzleIsSolved = false;
|
||||||
myNetwork.NonVisualDoDHCPOnAll();
|
myNetwork.NonVisualDoDHCPOnAll();
|
||||||
List<TraversalClass> TraversalCollection = new List<TraversalClass>();
|
List<TraversalClass> TraversalCollection = new List<TraversalClass>();
|
||||||
|
|
||||||
|
@ -1929,6 +1929,10 @@
|
|||||||
<value>Internet</value>
|
<value>Internet</value>
|
||||||
<comment>NB_InternetHomeAndOffice = Internet</comment>
|
<comment>NB_InternetHomeAndOffice = Internet</comment>
|
||||||
</data>
|
</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">
|
<data name="Options_Caption_full" xml:space="preserve">
|
||||||
<value>Full</value>
|
<value>Full</value>
|
||||||
<comment>Options_Caption_full = Full</comment>
|
<comment>Options_Caption_full = Full</comment>
|
||||||
|
Loading…
Reference in New Issue
Block a user