Accepted the merge

This commit is contained in:
Tim Young 2015-11-17 07:34:19 -05:00
commit 1fd80792ae
3 changed files with 172 additions and 40 deletions

View File

@ -233,7 +233,7 @@ namespace EduNetworkBuilder
public static int PacketPixelSize = 8; //The size of the packet pixel public static int PacketPixelSize = 8; //The size of the packet pixel
public static int PacketVersionNum = 2; //2 uses the new stuff. Anything else uses the old stuff public static int PacketVersionNum = 2; //2 uses the new stuff. Anything else uses the old stuff
public const int GridSize = 10; public const int GridSize = 10;
public static string[,] LanguageChoices = { { "English", "en" }, { "French", "fr" } }; public static string[,] LanguageChoices = { { NB.Translate("NB_NBEn"), "en" }, { NB.Translate("NB_NBFr"), "fr" } };
public static int WirelessMaxUnsuccessfulLink = 120; //The link will connect, but the packet will drop public static int WirelessMaxUnsuccessfulLink = 120; //The link will connect, but the packet will drop
public static int WirelessMaxSuccessfulLink = 100; //Packets will drop after this distance public static int WirelessMaxSuccessfulLink = 100; //Packets will drop after this distance
public static int WirelessReconnectDistance = 70; //Try to find a closer AP if we are this far out. public static int WirelessReconnectDistance = 70; //Try to find a closer AP if we are this far out.
@ -373,11 +373,11 @@ namespace EduNetworkBuilder
//we need to choose a language: //we need to choose a language:
Form LanguageForm = new Form(); Form LanguageForm = new Form();
LanguageForm.Text = "Choose Language"; LanguageForm.Text = NB.Translate("NB_ChangeLang1");
Label lblText = new Label(); Label lblText = new Label();
lblText.Location = new Point(5, 5); lblText.Location = new Point(5, 5);
lblText.AutoSize = true; lblText.AutoSize = true;
lblText.Text = "Choose a Language:"; lblText.Text = NB.Translate("NB_ChangeLang2");
LanguageForm.Icon = Properties.Resources.NBIco; LanguageForm.Icon = Properties.Resources.NBIco;
ComboBox cbQuestions = new ComboBox(); ComboBox cbQuestions = new ComboBox();
@ -400,7 +400,7 @@ namespace EduNetworkBuilder
Button btnAccept = new Button(); Button btnAccept = new Button();
btnAccept.Location = new Point(cbQuestions.Location.X, cbQuestions.Location.Y + cbQuestions.Height + 10); btnAccept.Location = new Point(cbQuestions.Location.X, cbQuestions.Location.Y + cbQuestions.Height + 10);
btnAccept.Text = "OK"; btnAccept.Text = NB.Translate("NB_ChangeLangOK");
btnAccept.Click += (s, g) => { Button b = (Button)s; Form f = (Form)b.Parent; f.Close(); }; btnAccept.Click += (s, g) => { Button b = (Button)s; Form f = (Form)b.Parent; f.Close(); };
LanguageForm.Controls.Add(lblText); LanguageForm.Controls.Add(lblText);
@ -523,7 +523,7 @@ namespace EduNetworkBuilder
//make a new window if needed //make a new window if needed
foreach(Form myfrm in Application.OpenForms) foreach(Form myfrm in Application.OpenForms)
{ {
if(myfrm.Name == "Context") if(myfrm.Name == NB.Translate("NB_RdCtxtHelp"))
{ {
//We have a context window //We have a context window
tForm = (RTFWindow)myfrm; tForm = (RTFWindow)myfrm;
@ -534,7 +534,7 @@ namespace EduNetworkBuilder
{ {
//We do not have one yet. Make a new one //We do not have one yet. Make a new one
tForm = new RTFWindow(RTFWindowContents.help); tForm = new RTFWindow(RTFWindowContents.help);
tForm.Name = "Context"; tForm.Name = NB.Translate("NB_RdCtxtHelp");
} }
//load help //load help
tForm.Show(); tForm.Show();

View File

@ -116,7 +116,7 @@ namespace EduNetworkBuilder
{ {
case NetTestVerbosity.basic: case NetTestVerbosity.basic:
if(TheTest != NetTestType.ReadContextHelp) if(TheTest != NetTestType.ReadContextHelp)
toreturn = "Has a problem"; toreturn = NB.Translate("NT_TstDscriptProblem");
else else
toreturn = NB.Translate("_ReadContext"); toreturn = NB.Translate("_ReadContext");
break; break;
@ -124,55 +124,55 @@ namespace EduNetworkBuilder
switch (TheTest) switch (TheTest)
{ {
case NetTestType.NeedsDefaultGW: case NetTestType.NeedsDefaultGW:
toreturn = "Needs the gateway set"; toreturn = NB.Translate("NT_TstDscriptGteway");
break; break;
// case NetTestType.NeedsPingToHost: // case NetTestType.NeedsPingToHost:
// toreturn = "Cannot ping"; // toreturn = "Cannot ping";
// break; // break;
case NetTestType.NeedsRouteToNet: case NetTestType.NeedsRouteToNet:
toreturn = "Needs a route set"; toreturn = NB.Translate("NT_TstDscriptRout");
break; break;
case NetTestType.NeedsLocalIPTo: case NetTestType.NeedsLocalIPTo:
toreturn = "Needs a local IP"; toreturn = NB.Translate("NT_TstDscriptIP");
break; break;
case NetTestType.NeedsLinkToDevice: case NetTestType.NeedsLinkToDevice:
toreturn = "Needs to be connected to the network."; toreturn = NB.Translate("NT_TstDiscriptConnect");
break; break;
case NetTestType.SuccessfullyArps: case NetTestType.SuccessfullyArps:
toreturn = "Needs to find ARP from some device"; toreturn = NB.Translate("NT_TstDiscriptARP");
break; break;
case NetTestType.SuccessfullyDHCPs: case NetTestType.SuccessfullyDHCPs:
toreturn = "Needs a DHCP IP address"; toreturn = NB.Translate("NT_TstDiscriptDHCPIP");
break; break;
case NetTestType.SuccessfullyPings: case NetTestType.SuccessfullyPings:
toreturn = "Must ping a host."; toreturn = NB.Translate("NT_TstDiscriptPing");
break; break;
case NetTestType.HelpRequest: case NetTestType.HelpRequest:
toreturn = "Get mouse-over help"; toreturn = NB.Translate("NT_TstDiscriptHelp");
break; break;
case NetTestType.FailedPing: case NetTestType.FailedPing:
toreturn = "Should fail to ping a specific host"; toreturn = NB.Translate("NT_TstDiscriptPingHost");
break; break;
case NetTestType.DHCPServerEnabled: case NetTestType.DHCPServerEnabled:
toreturn = "Needs change to DHCP server:"; toreturn = NB.Translate("NT_TstDiscriptDHCP");
break; break;
case NetTestType.LockAll: case NetTestType.LockAll:
toreturn = "Is Locked"; toreturn = NB.Translate("NT_TstDiscriptLock");
break; break;
case NetTestType.LockDHCP: case NetTestType.LockDHCP:
toreturn = "Has Locked DHCP"; toreturn = NB.Translate("NT_TstDiscriptLockDHCP");
break; break;
case NetTestType.LockIP: case NetTestType.LockIP:
toreturn = "Has Locked IP"; toreturn = NB.Translate("NT_TstDiscriptLockIP");
break; break;
case NetTestType.LockNic: case NetTestType.LockNic:
toreturn = "Has Locked NIC"; toreturn = NB.Translate("NT_TstDiscriptLockNIC");
break; break;
case NetTestType.LockRoute: case NetTestType.LockRoute:
toreturn = "Has Locked Route"; toreturn = NB.Translate("NT_TstDiscriptLockRout");
break; break;
case NetTestType.LockGateway: case NetTestType.LockGateway:
toreturn = "Has Locked Gateway"; toreturn = NB.Translate("NT_TstDiscriptGteway");
break; break;
case NetTestType.ReadContextHelp: case NetTestType.ReadContextHelp:
toreturn = NB.Translate("_ReadContext"); toreturn = NB.Translate("_ReadContext");
@ -184,56 +184,56 @@ namespace EduNetworkBuilder
switch (TheTest) switch (TheTest)
{ {
case NetTestType.NeedsDefaultGW: case NetTestType.NeedsDefaultGW:
toreturn = "Needs the gateway set to:"; toreturn = NB.Translate("NT_TstDiscriptGteway2");
break; break;
// case NetTestType.NeedsPingToHost: // case NetTestType.NeedsPingToHost:
// toreturn = "Cannot ping host:"; // toreturn = "Cannot ping host:";
// break; // break;
case NetTestType.NeedsRouteToNet: case NetTestType.NeedsRouteToNet:
toreturn = "Needs a route to network:"; toreturn = NB.Translate("NT_TstDiscriptRout2");
break; break;
case NetTestType.NeedsLocalIPTo: case NetTestType.NeedsLocalIPTo:
toreturn = "Needs an IP local to host:"; toreturn = NB.Translate("NT_TstDiscriptIP2");
break; break;
case NetTestType.NeedsLinkToDevice: case NetTestType.NeedsLinkToDevice:
toreturn = "Needs a link to host:"; toreturn = NB.Translate("NT_TstDiscriptLink");
break; break;
case NetTestType.SuccessfullyArps: case NetTestType.SuccessfullyArps:
toreturn = "Needs to find ARP from:"; toreturn = NB.Translate("NT_TstDiscriptARP2");
break; break;
case NetTestType.SuccessfullyDHCPs: case NetTestType.SuccessfullyDHCPs:
toreturn = "Needs a DHCP IP address from server:"; toreturn = NB.Translate("NT_TstDiscriptDHCPIP2");
break; break;
case NetTestType.SuccessfullyPings: case NetTestType.SuccessfullyPings:
toreturn = "Must ping:"; toreturn = NB.Translate("NT_TstDiscriptPing2");
break; break;
case NetTestType.HelpRequest: case NetTestType.HelpRequest:
toreturn = "Get mouse-over help of level:"; toreturn = NB.Translate("NT_TstDiscriptHelp2");
break; break;
case NetTestType.FailedPing: case NetTestType.FailedPing:
toreturn = "Needs to try to ping (and fail):"; toreturn = NB.Translate("NT_TstDiscriptPingFail");
break; break;
case NetTestType.DHCPServerEnabled: case NetTestType.DHCPServerEnabled:
toreturn = "DHCP Server enabled = "; toreturn = NB.Translate("NT_TstDiscriptDHCP2");
break; break;
case NetTestType.LockAll: case NetTestType.LockAll:
toreturn = "Is Locked:"; toreturn = NB.Translate("NT_TstDiscriptLock") + ":";
break; break;
case NetTestType.LockDHCP: case NetTestType.LockDHCP:
toreturn = "Has Locked DHCP:"; toreturn = NB.Translate("NT_TstDiscriptLockDHCP") + ":";
break; break;
case NetTestType.LockIP: case NetTestType.LockIP:
toreturn = "Has Locked IP:"; toreturn = NB.Translate("NT_TstDiscriptLockIP") + ":";
break; break;
case NetTestType.LockNic: case NetTestType.LockNic:
toreturn = "Has Locked NIC:"; toreturn = NB.Translate("NT_TstDiscriptLockNIC") + ":";
break; break;
case NetTestType.LockRoute: case NetTestType.LockRoute:
toreturn = "Has Locked Route:"; toreturn = NB.Translate("NT_TstDiscriptLockRout") + ":";
break; break;
case NetTestType.LockGateway: case NetTestType.LockGateway:
toreturn = "Has Locked Gateway:"; toreturn = NB.Translate("NT_TstDiscriptGteway") + ":";
break; break;
case NetTestType.ReadContextHelp: case NetTestType.ReadContextHelp:
toreturn = NB.Translate("_ReadContext"); toreturn = NB.Translate("_ReadContext");

View File

@ -953,7 +953,139 @@
<value>--Static Routes (Read/Write)--</value> <value>--Static Routes (Read/Write)--</value>
<comment>LBW_UpdateFormStatRout = --Static Routes (Read/Write)--</comment> <comment>LBW_UpdateFormStatRout = --Static Routes (Read/Write)--</comment>
</data> </data>
<data name="NC_FoundLocalIF" xml:space="preserve"> <data name="NB_ChangeLang1" xml:space="preserve">
<value>Choose Language</value>
<comment>NB_ChangeLang1 = Choose Language</comment>
</data>
<data name="NB_ChangeLang2" xml:space="preserve">
<value>Choose a Language:</value>
<comment>NB_ChangeLang2 = Choose a Language:</comment>
</data>
<data name="NB_ChangeLangOK" xml:space="preserve">
<value>OK</value>
<comment>NB_ChangeLangOK = OK</comment>
</data>
<data name="NB_NBEn" xml:space="preserve">
<value>English</value>
<comment>NB_NBEn = English</comment>
</data>
<data name="NB_NBFr" xml:space="preserve">
<value>French</value>
<comment>NB_NBFr = French</comment>
</data>
<data name="NB_RdCtxtHelp" xml:space="preserve">
<value>Context</value>
<comment>NB_RdCtxtHelp = Context</comment>
</data>
<data name="NT_TstDiscriptARP" xml:space="preserve">
<value>Needs to find ARP from some device</value>
<comment>NT_TstDiscriptARP = Needs to find ARP from some device</comment>
</data>
<data name="NT_TstDiscriptARP2" xml:space="preserve">
<value>Needs to find ARP from:</value>
<comment>NT_TstDiscriptARP2 = Needs to find ARP from:</comment>
</data>
<data name="NT_TstDiscriptConnect" xml:space="preserve">
<value>Needs to be connected to the network.</value>
<comment>NT_TstDiscriptConnect = Needs to be connected to the network.</comment>
</data>
<data name="NT_TstDiscriptDHCP" xml:space="preserve">
<value>Needs change to DHCP server:</value>
<comment>NT_TstDiscriptDHCP = Needs change to DHCP server:</comment>
</data>
<data name="NT_TstDiscriptDHCP2" xml:space="preserve">
<value>DHCP Server enabled =</value>
<comment>NT_TstDiscriptDHCP2 = DHCP Server enabled =</comment>
</data>
<data name="NT_TstDiscriptDHCPIP" xml:space="preserve">
<value>Needs a DHCP IP address</value>
<comment>NT_TstDiscriptDHCPIP = Needs a DHCP IP address</comment>
</data>
<data name="NT_TstDiscriptDHCPIP2" xml:space="preserve">
<value>Needs a DHCP IP address from server:</value>
<comment>NT_TstDiscriptDHCPIP2 = Needs a DHCP IP address from server:</comment>
</data>
<data name="NT_TstDiscriptGteway2" xml:space="preserve">
<value>Needs the gateway set to:</value>
<comment>NT_TstDiscriptGteway2 = Needs the gateway set to:</comment>
</data>
<data name="NT_TstDiscriptHelp" xml:space="preserve">
<value>Get mouse-over help</value>
<comment>NT_TstDiscriptHelp = Get mouse-over help</comment>
</data>
<data name="NT_TstDiscriptHelp2" xml:space="preserve">
<value>Get mouse-over help of level:</value>
<comment>NT_TstDiscriptHelp2 = Get mouse-over help of level:</comment>
</data>
<data name="NT_TstDiscriptIP2" xml:space="preserve">
<value>Needs an IP local to host:</value>
<comment>NT_TstDiscriptIP2 = Needs an IP local to host:</comment>
</data>
<data name="NT_TstDiscriptLink" xml:space="preserve">
<value>Needs a link to host:</value>
<comment>NT_TstDiscriptLink = Needs a link to host:</comment>
</data>
<data name="NT_TstDiscriptLock" xml:space="preserve">
<value>Is Locked</value>
<comment>NT_TstDiscriptLock = Is Locked</comment>
</data>
<data name="NT_TstDiscriptLockDHCP" xml:space="preserve">
<value>Has Locked DHCP</value>
<comment>NT_TstDiscriptLockDHCP = Has Locked DHCP</comment>
</data>
<data name="NT_TstDiscriptLockGteway" xml:space="preserve">
<value>Has Locked Gateway</value>
<comment>NT_TstDiscriptGteway = Has Locked Gateway</comment>
</data>
<data name="NT_TstDiscriptLockIP" xml:space="preserve">
<value>Has Locked IP</value>
<comment>NT_TstDiscriptLockIP = Has Locked IP</comment>
</data>
<data name="NT_TstDiscriptLockNIC" xml:space="preserve">
<value>Has Locked NIC</value>
<comment>NT_TstDiscriptLockNIC = Has Locked NIC</comment>
</data>
<data name="NT_TstDiscriptLockRout" xml:space="preserve">
<value>Has Locked Route</value>
<comment>NT_TstDiscriptLockRout = Has Locked Route</comment>
</data>
<data name="NT_TstDiscriptPing" xml:space="preserve">
<value>Must ping a host.</value>
<comment>NT_TstDiscriptPing = Must ping a host.</comment>
</data>
<data name="NT_TstDiscriptPing2" xml:space="preserve">
<value>Must ping:</value>
<comment>NT_TstDiscriptPing2 = Must ping:</comment>
</data>
<data name="NT_TstDiscriptPingFail" xml:space="preserve">
<value>Needs to try to ping (and fail):</value>
<comment>NT_TstDiscriptPingFail = Needs to try to ping (and fail):</comment>
</data>
<data name="NT_TstDiscriptPingHost" xml:space="preserve">
<value>Should fail to ping a specific host</value>
<comment>NT_TstDiscriptPingHost = Should fail to ping a specific host</comment>
</data>
<data name="NT_TstDiscriptRout2" xml:space="preserve">
<value>Needs a route to network:</value>
<comment>NT_TstDiscriptRout2 = Needs a route to network:</comment>
</data>
<data name="NT_TstDscriptGteway" xml:space="preserve">
<value>Needs the gateway set</value>
<comment>NT_TstDscriptGteway = Needs the gateway set</comment>
</data>
<data name="NT_TstDscriptIP" xml:space="preserve">
<value>Needs a local IP</value>
<comment>NT_TstDscriptIP = Need a local IP</comment>
</data>
<data name="NT_TstDscriptProblem" xml:space="preserve">
<value>Has a problem</value>
<comment>NT_TestDiscriptProblem = Has a problem</comment>
</data>
<data name="NT_TstDscriptRout" xml:space="preserve">
<value>Needs a route set</value>
<comment>NT_TstDscriptRout = Needs a route set</comment>
</data>
<data name="NC_FoundLocalIP" xml:space="preserve">
<value>Found local interface: ip {0} gw {1}</value> <value>Found local interface: ip {0} gw {1}</value>
<comment>NC_FoundLocalIP = Found local interface: ip {0} gw {1}</comment> <comment>NC_FoundLocalIP = Found local interface: ip {0} gw {1}</comment>
</data> </data>