Catchup to ND Edits

This commit is contained in:
Peter Wilson 2015-11-18 16:34:00 -06:00
parent 5bd6958340
commit 6695e979ab
7 changed files with 90 additions and 22 deletions

View File

@ -28,7 +28,7 @@ namespace EduNetworkBuilder
OriginalItem = Original_Item;
ClonedItem = NetworkComponent.Clone(OriginalItem);
UpdateForm();
lblHelp.Text = "Select the network card or interface for that network card that you wish to edit. Then press the [edit] button to make changes to that. Press the [-] to remove it, and press [+] to add another.";
lblHelp.Text = NB.Translate("DC_DeviceConfigEdit");
}
private void LoadFromOrig()
@ -102,7 +102,7 @@ namespace EduNetworkBuilder
}
btnGateway.Visible = true;
btnGateway.Text = string.Format("Gateway: {0}", ndCLonedItem.GetGateway().GetIP.ToIpString());
btnGateway.Text = string.Format(NB.Translate("DC_UdFrmGtewayStr"), ndCLonedItem.GetGateway().GetIP.ToIpString());
tbHostname.Text = ndCLonedItem.hostname;
//Network cards are changed with the [edit] button and do not need to be updated here
//IPAddresses are changed with the [edit] button and do not need to be updated here
@ -209,7 +209,7 @@ namespace EduNetworkBuilder
otext = tbHostname.Text;
tbHostname.Text = OriginalItem.hostname;
MessageBox.Show(string.Format("The name '{0}' is being used as part of this puzzle and this machine cannot be named that.", otext));
MessageBox.Show(string.Format(NB.Translate("DC_HostValidateStr"), otext));
}
}
}

View File

@ -223,7 +223,7 @@ namespace EduNetworkBuilder
}
public string IPFormat(string gw)
{
string tstring = string.Format("IP:{0} Mask:{1} GW:{2}",
string tstring = string.Format(NB.Translate("IPA_IPFormatStr"),
PadIt(_ip.ToIpString()), PadIt(_mask.ToIpString()), PadIt(gw));
return tstring;
}

View File

@ -437,7 +437,7 @@ namespace EduNetworkBuilder
byte[] item = (byte[])myManager.GetObject(str);
if(item == null)
{
MessageBox.Show(String.Format("NB_LoadPuzInfo", str));
MessageBox.Show(String.Format(NB.Translate("NB_LoadPuzInfo"), str));
continue;
}
myString = new StreamReader(new MemoryStream(item), true).ReadToEnd();
@ -544,12 +544,12 @@ namespace EduNetworkBuilder
{
foreach (string tStr in myNetwork.GetIncompleteTestDestinations(ReleasedOn.hostname, true))
{
pbNetworkView.ContextMenuStrip.Items.Add(string.Format("Ping {0}",tStr));
pbNetworkView.ContextMenuStrip.Items.Add(string.Format(NB.Translate("NB_NetViewPingStr"),tStr));
pbNetworkView.ContextMenuStrip.Items[index++].Click += pbNetworkView_Ping_Name_Click;
}
foreach (string tStr in myNetwork.GetIncompleteTestDestinations(ReleasedOn.hostname, false))
{
pbNetworkView.ContextMenuStrip.Items.Add(string.Format("Arp {0}", tStr));
pbNetworkView.ContextMenuStrip.Items.Add(string.Format("NB_NetViewArpStr", tStr));
pbNetworkView.ContextMenuStrip.Items[index++].Click += pbNetworkView_Arp_Name_Click;
}
}
@ -586,7 +586,7 @@ namespace EduNetworkBuilder
}
foreach (string host in ReleasedOn.ListOfConnectedHosts())
{
pbNetworkView.ContextMenuStrip.Items.Add(string.Format("Remove Link To {0}", host));
pbNetworkView.ContextMenuStrip.Items.Add(string.Format("NB_NetViewRmLnkStr", host));
pbNetworkView.ContextMenuStrip.Items[index++].Click += pbNetworkView_RemoveLink_Click;
}
}

View File

@ -47,7 +47,7 @@ namespace EduNetworkBuilder
lblVPNEnd = new Label();
lblVPNEnd.Location = new Point(10, btnVPNEnd.Location.Y);
lblVPNEnd.Text = "VPN Endpoint:";
lblVPNEnd.Text = NB.Translate("NCE_NCEVPNEnd");
Controls.Add(btnVPNEnd);
Controls.Add(lblVPNEnd);
this.Height = lblVPNEnd.Location.Y + lblVPNEnd.Height + 80;
@ -59,7 +59,7 @@ namespace EduNetworkBuilder
lblVPNEncrypt = new Label();
lblVPNEncrypt.Location = new Point(10, tbVPNEncrypt.Location.Y);
lblVPNEncrypt.Text = "Encryption Key:";
lblVPNEncrypt.Text = NB.Translate("NCE_NCEEncrypt");
Controls.Add(tbVPNEncrypt);
Controls.Add(lblVPNEncrypt);
this.Height = tbVPNEncrypt.Location.Y + tbVPNEncrypt.Height + 80;
@ -88,7 +88,7 @@ namespace EduNetworkBuilder
lblVPNEncrypt = new Label();
lblVPNEncrypt.Location = new Point(10, tbVPNEncrypt.Location.Y);
lblVPNEncrypt.Text = "Wireless Key:";
lblVPNEncrypt.Text = NB.Translate("NCE_NCEWireless");
Controls.Add(tbVPNEncrypt);
Controls.Add(lblVPNEncrypt);
this.Height = tbVPNEncrypt.Location.Y + tbVPNEncrypt.Height + 80;
@ -163,9 +163,9 @@ namespace EduNetworkBuilder
else
lblLinkStatus.Visible = true;
if (MyNicToEdit.isConnected(true))
lblLinkStatus.Text = "Connected";
lblLinkStatus.Text = NB.Translate("NCE_UdfrmCon");
else
lblLinkStatus.Text = "Disconnected";
lblLinkStatus.Text = NB.Translate("NCE_UdfrmDiscon");
}
private void btnDone_Click(object sender, EventArgs e)

View File

@ -85,7 +85,7 @@ namespace EduNetworkBuilder
{
if (!typeof(T).IsSerializable)
{
throw new ArgumentException("The type must be serializable.", "source");
throw new ArgumentException(NB.Translate("NC_CloneSerialzable"), NB.Translate("NC_source"));
}
// Don't serialize a null object, simply return the default for that object

View File

@ -292,7 +292,7 @@ namespace EduNetworkBuilder
public void EditGateway()
{
DefaultGW.Edit(this,"Default Gateway");
DefaultGW.Edit(this,NB.Translate("ND_EdtGteway"));
}
public IPAddress GetGateway()
@ -704,7 +704,7 @@ namespace EduNetworkBuilder
}
else
{
MessageBox.Show(string.Format("The network card, {0} is locked as part of the puzzle.", NICs[index].NicName()), "Locked NIC");
MessageBox.Show(string.Format(NB.Translate("ND_DelNicNicLockStr"), NICs[index].NicName()), NB.Translate("ND_DelNicNicLock"));
}
}
public bool AutoJoinWireless()
@ -1127,7 +1127,7 @@ namespace EduNetworkBuilder
{
nic.SetIPForDHCP(); //clear the source IP
}
Packet DHCPPacket = new Packet(this, "", NB.BroadcastMACString, "DHCP Request", PacketType.dhcp_request);
Packet DHCPPacket = new Packet(this, "", NB.BroadcastMACString, NB.Translate("NB_NetViewDHCP"), PacketType.dhcp_request);
DHCPPacket.destIP = new IPAddress(NB.BroadcastIPString);
Network myNet = NB.GetNetwork();
myNet.addPacket(DHCPPacket);
@ -1137,7 +1137,7 @@ namespace EduNetworkBuilder
public void PingFromHere(IPAddress Destination)
{
//We need to create a packet
Packet PingPacket = new Packet(this,Destination,"Ping",PacketType.ping_request);
Packet PingPacket = new Packet(this,Destination, NB.Translate("H_Ping_Title"), PacketType.ping_request);
Network myNet = NB.GetNetwork();
myNet.addPacket(PingPacket);
}
@ -1145,7 +1145,7 @@ namespace EduNetworkBuilder
public void AskArpFromHere(IPAddress Destination, PacketMessage Tracker=null)
{
//We need to create a packet
Packet ArpPacket = new Packet(this, Destination, "Arp Request", PacketType.arp_request);
Packet ArpPacket = new Packet(this, Destination, NB.Translate("NB_NetViewArp2"), PacketType.arp_request);
if (Tracker != null)
ArpPacket.ReplaceMessage(Tracker);
Network myNet = NB.GetNetwork();
@ -1163,7 +1163,7 @@ namespace EduNetworkBuilder
PacketType TunType = PacketType.tun_packet;
if (Encryption != "")
TunType = PacketType.vpn_packet;
Packet TunnelPacket = new Packet(this, Destination, "Tunnel", TunType);
Packet TunnelPacket = new Packet(this, Destination, NB.Translate("ND_TunlPckTunl"), TunType);
TunnelPacket.payloadPacket = Payload;
TunnelPacket.EncryptionString = Encryption;
if(Payload != null)

View File

@ -566,11 +566,11 @@
<comment>Text used in the program on buttons and the like</comment>
</data>
<data name="H_Help_Key" xml:space="preserve">
<value />
<value>Help:</value>
<comment>Text from the help document that we jump to</comment>
</data>
<data name="H_Help_Title" xml:space="preserve">
<value />
<value>Help</value>
<comment>Text used in the program on buttons and the like</comment>
</data>
<data name="H_Hub_Key" xml:space="preserve">
@ -1301,10 +1301,62 @@
<value>The packet timed out and was dropped.</value>
<comment>N_ProssShouldContinTimeout = The packet timed out and was dropped.</comment>
</data>
<data name="DC_DeviceConfigEdit" xml:space="preserve">
<value>Select the network card or interface for that network card that you wish to edit. Then press the [edit] button to make changes to that. Press the [-] to remove it, and press [+] to add another.</value>
<comment>DC_DeviceConfigEdit = Select the network card or interface for that network card that you wish to edit. Then press the [edit] button to make changes to that. Press the [-] to remove it, and press [+] to add another.</comment>
</data>
<data name="DC_HostValidateStr" xml:space="preserve">
<value>The name '{0}' is being used as part of this puzzle and this machine cannot be named that.</value>
<comment>DC_HostValidate = The name '{0}' is being used as part of this puzzle and this machine cannot be named that.</comment>
</data>
<data name="DC_UdFrmGtewayStr" xml:space="preserve">
<value>Gateway: {0}</value>
<comment>DC_UdFrmGteway = Gateway: {0}</comment>
</data>
<data name="IPA_IPFormatStr" xml:space="preserve">
<value>IP:{0} Mask:{1} GW:{2}</value>
<comment>IPA_IPFormatStr = IP:{0} Mask:{1} GW:{2}</comment>
</data>
<data name="NB_LoadPuzInfo" xml:space="preserve">
<value>Skipping Invalid Puzzle: '{0}'</value>
<comment>NB_LoadPuzInfo = Skipping Invalid Puzzle: '{0}'</comment>
</data>
<data name="NB_NetViewArpStr" xml:space="preserve">
<value>Arp {0}</value>
<comment>NB_NetViewArpStr = Arp {0}</comment>
</data>
<data name="NB_NetViewPingStr" xml:space="preserve">
<value>Ping {0}</value>
<comment>NB_NetViewPingStr = Ping {0}</comment>
</data>
<data name="NB_NetViewRmLnkStr" xml:space="preserve">
<value>Remove Link To {0}</value>
<comment>NB_NetViewRmLnk = Remove Link To {0}</comment>
</data>
<data name="NCE_NCEEncrypt" xml:space="preserve">
<value>Encryption Key:</value>
<comment>NCE_NCEEncrypt = Encryption Key:</comment>
</data>
<data name="NCE_NCEVPNEnd" xml:space="preserve">
<value>VPN Endpoint:</value>
<comment>NCE_NCEVPNEnd = VPN Endpoint:</comment>
</data>
<data name="NCE_NCEWireless" xml:space="preserve">
<value>Wireless Key:</value>
<comment>NCE_NCEWireless = Wireless Key:</comment>
</data>
<data name="NCE_UdfrmCon" xml:space="preserve">
<value>Connected</value>
<comment>NCE_UdfrmCon = Connected</comment>
</data>
<data name="NCE_UdfrmDiscon" xml:space="preserve">
<value>Disconnected</value>
<comment>NCE_UdfrmDiscon = Disconnected</comment>
</data>
<data name="NCE_VPNEnd" xml:space="preserve">
<value>Endpoint</value>
<comment>NCE_VPNEnd = Endpoint</comment>
</data>
<data name="NC_CloneSerialzable" xml:space="preserve">
<value>The type must be serializable.</value>
<comment>NC_CloneSerialzable = The type must be serializable.</comment>
@ -1321,6 +1373,22 @@
<value>source</value>
<comment>NC_source = source</comment>
</data>
<data name="ND_DelNicNicLock" xml:space="preserve">
<value>Locked NIC</value>
<comment>ND_DelNicNicLock = Locked NIC</comment>
</data>
<data name="ND_DelNicNicLockStr" xml:space="preserve">
<value>The network card, {0} is locked as part of the puzzle.</value>
<comment>ND_DelNicNicLockStr = The network card, {0} is locked as part of the puzzle.</comment>
</data>
<data name="ND_EdtGteway" xml:space="preserve">
<value>Default Gateway</value>
<comment>ND_EdtGteway = Default Gateway</comment>
</data>
<data name="ND_TunlPckTunl" xml:space="preserve">
<value>Tunnel</value>
<comment>ND_TunlPckTunl = Tunnel</comment>
</data>
<data name="N_ProssShouldContinSec" xml:space="preserve">
<value>Total seconds = {0} Stopping.</value>
<comment>N_ProssShouldContinSec = Total seconds = {0} Stopping.</comment>