Changed layout of messages to make them consistent

This commit is contained in:
Tim Young 2015-11-21 17:55:03 -05:00
parent d10ffd7077
commit 3f5100dcc0
9 changed files with 100 additions and 103 deletions

View File

@ -354,6 +354,16 @@ namespace EduNetworkBuilder
if (myWin == null) return null; if (myWin == null) return null;
return myWin.PuzzleInfoFromName(PuzzleName); return myWin.PuzzleInfoFromName(PuzzleName);
} }
public static string LeftPad(string what, int amount=-1)
{
int UseAmount = 10;
if (amount != -1) UseAmount = amount;
string format = "{0," + (0 - UseAmount).ToString() + "}";
string mystring = string.Format(format, what);
return mystring;
}
public static void ChangeLanguage() public static void ChangeLanguage()
{ {
//Find the window. If it exists, use /set the language setting there. If not, use / set the default. //Find the window. If it exists, use /set the language setting there. If not, use / set the default.

View File

@ -113,35 +113,35 @@
// newToolStripMenuItem // newToolStripMenuItem
// //
this.newToolStripMenuItem.Name = "newToolStripMenuItem"; this.newToolStripMenuItem.Name = "newToolStripMenuItem";
this.newToolStripMenuItem.Size = new System.Drawing.Size(125, 24); this.newToolStripMenuItem.Size = new System.Drawing.Size(131, 26);
this.newToolStripMenuItem.Text = "New"; this.newToolStripMenuItem.Text = "New";
this.newToolStripMenuItem.Click += new System.EventHandler(this.newToolStripMenuItem_Click); this.newToolStripMenuItem.Click += new System.EventHandler(this.newToolStripMenuItem_Click);
// //
// loadToolStripMenuItem // loadToolStripMenuItem
// //
this.loadToolStripMenuItem.Name = "loadToolStripMenuItem"; this.loadToolStripMenuItem.Name = "loadToolStripMenuItem";
this.loadToolStripMenuItem.Size = new System.Drawing.Size(125, 24); this.loadToolStripMenuItem.Size = new System.Drawing.Size(131, 26);
this.loadToolStripMenuItem.Text = "Load"; this.loadToolStripMenuItem.Text = "Load";
this.loadToolStripMenuItem.Click += new System.EventHandler(this.loadToolStripMenuItem_Click); this.loadToolStripMenuItem.Click += new System.EventHandler(this.loadToolStripMenuItem_Click);
// //
// reloadToolStripMenuItem // reloadToolStripMenuItem
// //
this.reloadToolStripMenuItem.Name = "reloadToolStripMenuItem"; this.reloadToolStripMenuItem.Name = "reloadToolStripMenuItem";
this.reloadToolStripMenuItem.Size = new System.Drawing.Size(125, 24); this.reloadToolStripMenuItem.Size = new System.Drawing.Size(131, 26);
this.reloadToolStripMenuItem.Text = "Reload"; this.reloadToolStripMenuItem.Text = "Reload";
this.reloadToolStripMenuItem.Click += new System.EventHandler(this.reloadToolStripMenuItem_Click); this.reloadToolStripMenuItem.Click += new System.EventHandler(this.reloadToolStripMenuItem_Click);
// //
// saveToolStripMenuItem // saveToolStripMenuItem
// //
this.saveToolStripMenuItem.Name = "saveToolStripMenuItem"; this.saveToolStripMenuItem.Name = "saveToolStripMenuItem";
this.saveToolStripMenuItem.Size = new System.Drawing.Size(125, 24); this.saveToolStripMenuItem.Size = new System.Drawing.Size(131, 26);
this.saveToolStripMenuItem.Text = "Save"; this.saveToolStripMenuItem.Text = "Save";
this.saveToolStripMenuItem.Click += new System.EventHandler(this.saveToolStripMenuItem_Click); this.saveToolStripMenuItem.Click += new System.EventHandler(this.saveToolStripMenuItem_Click);
// //
// exitToolStripMenuItem // exitToolStripMenuItem
// //
this.exitToolStripMenuItem.Name = "exitToolStripMenuItem"; this.exitToolStripMenuItem.Name = "exitToolStripMenuItem";
this.exitToolStripMenuItem.Size = new System.Drawing.Size(125, 24); this.exitToolStripMenuItem.Size = new System.Drawing.Size(131, 26);
this.exitToolStripMenuItem.Text = "Exit"; this.exitToolStripMenuItem.Text = "Exit";
this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click); this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click);
// //
@ -161,38 +161,38 @@
// cutToolStripMenuItem // cutToolStripMenuItem
// //
this.cutToolStripMenuItem.Name = "cutToolStripMenuItem"; this.cutToolStripMenuItem.Name = "cutToolStripMenuItem";
this.cutToolStripMenuItem.Size = new System.Drawing.Size(197, 24); this.cutToolStripMenuItem.Size = new System.Drawing.Size(203, 26);
this.cutToolStripMenuItem.Text = "Cut"; this.cutToolStripMenuItem.Text = "Cut";
// //
// copyToolStripMenuItem // copyToolStripMenuItem
// //
this.copyToolStripMenuItem.Name = "copyToolStripMenuItem"; this.copyToolStripMenuItem.Name = "copyToolStripMenuItem";
this.copyToolStripMenuItem.Size = new System.Drawing.Size(197, 24); this.copyToolStripMenuItem.Size = new System.Drawing.Size(203, 26);
this.copyToolStripMenuItem.Text = "Copy"; this.copyToolStripMenuItem.Text = "Copy";
// //
// pasteToolStripMenuItem // pasteToolStripMenuItem
// //
this.pasteToolStripMenuItem.Name = "pasteToolStripMenuItem"; this.pasteToolStripMenuItem.Name = "pasteToolStripMenuItem";
this.pasteToolStripMenuItem.Size = new System.Drawing.Size(197, 24); this.pasteToolStripMenuItem.Size = new System.Drawing.Size(203, 26);
this.pasteToolStripMenuItem.Text = "Paste"; this.pasteToolStripMenuItem.Text = "Paste";
// //
// undoToolStripMenuItem // undoToolStripMenuItem
// //
this.undoToolStripMenuItem.Name = "undoToolStripMenuItem"; this.undoToolStripMenuItem.Name = "undoToolStripMenuItem";
this.undoToolStripMenuItem.Size = new System.Drawing.Size(197, 24); this.undoToolStripMenuItem.Size = new System.Drawing.Size(203, 26);
this.undoToolStripMenuItem.Text = "Undo"; this.undoToolStripMenuItem.Text = "Undo";
// //
// optionsToolStripMenuItem // optionsToolStripMenuItem
// //
this.optionsToolStripMenuItem.Name = "optionsToolStripMenuItem"; this.optionsToolStripMenuItem.Name = "optionsToolStripMenuItem";
this.optionsToolStripMenuItem.Size = new System.Drawing.Size(197, 24); this.optionsToolStripMenuItem.Size = new System.Drawing.Size(203, 26);
this.optionsToolStripMenuItem.Text = "Options"; this.optionsToolStripMenuItem.Text = "Options";
this.optionsToolStripMenuItem.Click += new System.EventHandler(this.optionsToolStripMenuItem_Click); this.optionsToolStripMenuItem.Click += new System.EventHandler(this.optionsToolStripMenuItem_Click);
// //
// changeLanguageToolStripMenuItem // changeLanguageToolStripMenuItem
// //
this.changeLanguageToolStripMenuItem.Name = "changeLanguageToolStripMenuItem"; this.changeLanguageToolStripMenuItem.Name = "changeLanguageToolStripMenuItem";
this.changeLanguageToolStripMenuItem.Size = new System.Drawing.Size(197, 24); this.changeLanguageToolStripMenuItem.Size = new System.Drawing.Size(203, 26);
this.changeLanguageToolStripMenuItem.Text = "Change Language"; this.changeLanguageToolStripMenuItem.Text = "Change Language";
this.changeLanguageToolStripMenuItem.Click += new System.EventHandler(this.changeLanguageToolStripMenuItem_Click); this.changeLanguageToolStripMenuItem.Click += new System.EventHandler(this.changeLanguageToolStripMenuItem_Click);
// //
@ -210,28 +210,28 @@
// dHCPRequestToolStripMenuItem // dHCPRequestToolStripMenuItem
// //
this.dHCPRequestToolStripMenuItem.Name = "dHCPRequestToolStripMenuItem"; this.dHCPRequestToolStripMenuItem.Name = "dHCPRequestToolStripMenuItem";
this.dHCPRequestToolStripMenuItem.Size = new System.Drawing.Size(181, 24); this.dHCPRequestToolStripMenuItem.Size = new System.Drawing.Size(185, 26);
this.dHCPRequestToolStripMenuItem.Text = "DHCP Request"; this.dHCPRequestToolStripMenuItem.Text = "DHCP Request";
this.dHCPRequestToolStripMenuItem.Click += new System.EventHandler(this.dHCPRequestToolStripMenuItem_Click); this.dHCPRequestToolStripMenuItem.Click += new System.EventHandler(this.dHCPRequestToolStripMenuItem_Click);
// //
// clearArpTableToolStripMenuItem // clearArpTableToolStripMenuItem
// //
this.clearArpTableToolStripMenuItem.Name = "clearArpTableToolStripMenuItem"; this.clearArpTableToolStripMenuItem.Name = "clearArpTableToolStripMenuItem";
this.clearArpTableToolStripMenuItem.Size = new System.Drawing.Size(181, 24); this.clearArpTableToolStripMenuItem.Size = new System.Drawing.Size(185, 26);
this.clearArpTableToolStripMenuItem.Text = "Clear Arp Table"; this.clearArpTableToolStripMenuItem.Text = "Clear Arp Table";
this.clearArpTableToolStripMenuItem.Click += new System.EventHandler(this.clearArpTableToolStripMenuItem_Click); this.clearArpTableToolStripMenuItem.Click += new System.EventHandler(this.clearArpTableToolStripMenuItem_Click);
// //
// clearIPsToolStripMenuItem // clearIPsToolStripMenuItem
// //
this.clearIPsToolStripMenuItem.Name = "clearIPsToolStripMenuItem"; this.clearIPsToolStripMenuItem.Name = "clearIPsToolStripMenuItem";
this.clearIPsToolStripMenuItem.Size = new System.Drawing.Size(181, 24); this.clearIPsToolStripMenuItem.Size = new System.Drawing.Size(185, 26);
this.clearIPsToolStripMenuItem.Text = "Clear IPs"; this.clearIPsToolStripMenuItem.Text = "Clear IPs";
this.clearIPsToolStripMenuItem.Click += new System.EventHandler(this.clearIPsToolStripMenuItem_Click); this.clearIPsToolStripMenuItem.Click += new System.EventHandler(this.clearIPsToolStripMenuItem_Click);
// //
// pingToolStripMenuItem // pingToolStripMenuItem
// //
this.pingToolStripMenuItem.Name = "pingToolStripMenuItem"; this.pingToolStripMenuItem.Name = "pingToolStripMenuItem";
this.pingToolStripMenuItem.Size = new System.Drawing.Size(181, 24); this.pingToolStripMenuItem.Size = new System.Drawing.Size(185, 26);
this.pingToolStripMenuItem.Text = "Ping"; this.pingToolStripMenuItem.Text = "Ping";
this.pingToolStripMenuItem.Click += new System.EventHandler(this.pingToolStripMenuItem_Click); this.pingToolStripMenuItem.Click += new System.EventHandler(this.pingToolStripMenuItem_Click);
// //
@ -249,28 +249,28 @@
// helpToolStripMenuItem1 // helpToolStripMenuItem1
// //
this.helpToolStripMenuItem1.Name = "helpToolStripMenuItem1"; this.helpToolStripMenuItem1.Name = "helpToolStripMenuItem1";
this.helpToolStripMenuItem1.Size = new System.Drawing.Size(201, 24); this.helpToolStripMenuItem1.Size = new System.Drawing.Size(207, 26);
this.helpToolStripMenuItem1.Text = "Help"; this.helpToolStripMenuItem1.Text = "Help";
this.helpToolStripMenuItem1.Click += new System.EventHandler(this.helpToolStripMenuItem1_Click); this.helpToolStripMenuItem1.Click += new System.EventHandler(this.helpToolStripMenuItem1_Click);
// //
// aboutToolStripMenuItem // aboutToolStripMenuItem
// //
this.aboutToolStripMenuItem.Name = "aboutToolStripMenuItem"; this.aboutToolStripMenuItem.Name = "aboutToolStripMenuItem";
this.aboutToolStripMenuItem.Size = new System.Drawing.Size(201, 24); this.aboutToolStripMenuItem.Size = new System.Drawing.Size(207, 26);
this.aboutToolStripMenuItem.Text = "About"; this.aboutToolStripMenuItem.Text = "About";
this.aboutToolStripMenuItem.Click += new System.EventHandler(this.aboutToolStripMenuItem_Click); this.aboutToolStripMenuItem.Click += new System.EventHandler(this.aboutToolStripMenuItem_Click);
// //
// releaseNotesToolStripMenuItem // releaseNotesToolStripMenuItem
// //
this.releaseNotesToolStripMenuItem.Name = "releaseNotesToolStripMenuItem"; this.releaseNotesToolStripMenuItem.Name = "releaseNotesToolStripMenuItem";
this.releaseNotesToolStripMenuItem.Size = new System.Drawing.Size(201, 24); this.releaseNotesToolStripMenuItem.Size = new System.Drawing.Size(207, 26);
this.releaseNotesToolStripMenuItem.Text = "Release Notes"; this.releaseNotesToolStripMenuItem.Text = "Release Notes";
this.releaseNotesToolStripMenuItem.Click += new System.EventHandler(this.releaseNotesToolStripMenuItem_Click); this.releaseNotesToolStripMenuItem.Click += new System.EventHandler(this.releaseNotesToolStripMenuItem_Click);
// //
// checkForUpdatesToolStripMenuItem // checkForUpdatesToolStripMenuItem
// //
this.checkForUpdatesToolStripMenuItem.Name = "checkForUpdatesToolStripMenuItem"; this.checkForUpdatesToolStripMenuItem.Name = "checkForUpdatesToolStripMenuItem";
this.checkForUpdatesToolStripMenuItem.Size = new System.Drawing.Size(201, 24); this.checkForUpdatesToolStripMenuItem.Size = new System.Drawing.Size(207, 26);
this.checkForUpdatesToolStripMenuItem.Text = "Check For Updates"; this.checkForUpdatesToolStripMenuItem.Text = "Check For Updates";
// //
// samplesToolStripMenuItem // samplesToolStripMenuItem
@ -286,7 +286,7 @@
// puzzlesToolStripMenuItem // puzzlesToolStripMenuItem
// //
this.puzzlesToolStripMenuItem.Name = "puzzlesToolStripMenuItem"; this.puzzlesToolStripMenuItem.Name = "puzzlesToolStripMenuItem";
this.puzzlesToolStripMenuItem.Size = new System.Drawing.Size(135, 24); this.puzzlesToolStripMenuItem.Size = new System.Drawing.Size(140, 26);
this.puzzlesToolStripMenuItem.Text = "Puzzles"; this.puzzlesToolStripMenuItem.Text = "Puzzles";
this.puzzlesToolStripMenuItem.Click += new System.EventHandler(this.puzzlesToolStripMenuItem_Click); this.puzzlesToolStripMenuItem.Click += new System.EventHandler(this.puzzlesToolStripMenuItem_Click);
// //
@ -299,41 +299,41 @@
this.threeNetworksToolStripMenuItem, this.threeNetworksToolStripMenuItem,
this.firewallsToolStripMenuItem}); this.firewallsToolStripMenuItem});
this.solvedToolStripMenuItem.Name = "solvedToolStripMenuItem"; this.solvedToolStripMenuItem.Name = "solvedToolStripMenuItem";
this.solvedToolStripMenuItem.Size = new System.Drawing.Size(135, 24); this.solvedToolStripMenuItem.Size = new System.Drawing.Size(140, 26);
this.solvedToolStripMenuItem.Text = "Solved"; this.solvedToolStripMenuItem.Text = "Solved";
// //
// dHCPToolStripMenuItem // dHCPToolStripMenuItem
// //
this.dHCPToolStripMenuItem.Name = "dHCPToolStripMenuItem"; this.dHCPToolStripMenuItem.Name = "dHCPToolStripMenuItem";
this.dHCPToolStripMenuItem.Size = new System.Drawing.Size(181, 24); this.dHCPToolStripMenuItem.Size = new System.Drawing.Size(187, 26);
this.dHCPToolStripMenuItem.Text = "DHCP"; this.dHCPToolStripMenuItem.Text = "DHCP";
this.dHCPToolStripMenuItem.Click += new System.EventHandler(this.dHCPToolStripMenuItem_Click); this.dHCPToolStripMenuItem.Click += new System.EventHandler(this.dHCPToolStripMenuItem_Click);
// //
// oneNetworkToolStripMenuItem // oneNetworkToolStripMenuItem
// //
this.oneNetworkToolStripMenuItem.Name = "oneNetworkToolStripMenuItem"; this.oneNetworkToolStripMenuItem.Name = "oneNetworkToolStripMenuItem";
this.oneNetworkToolStripMenuItem.Size = new System.Drawing.Size(181, 24); this.oneNetworkToolStripMenuItem.Size = new System.Drawing.Size(187, 26);
this.oneNetworkToolStripMenuItem.Text = "One Network"; this.oneNetworkToolStripMenuItem.Text = "One Network";
this.oneNetworkToolStripMenuItem.Click += new System.EventHandler(this.oneNetworkToolStripMenuItem_Click); this.oneNetworkToolStripMenuItem.Click += new System.EventHandler(this.oneNetworkToolStripMenuItem_Click);
// //
// twoNetworksToolStripMenuItem // twoNetworksToolStripMenuItem
// //
this.twoNetworksToolStripMenuItem.Name = "twoNetworksToolStripMenuItem"; this.twoNetworksToolStripMenuItem.Name = "twoNetworksToolStripMenuItem";
this.twoNetworksToolStripMenuItem.Size = new System.Drawing.Size(181, 24); this.twoNetworksToolStripMenuItem.Size = new System.Drawing.Size(187, 26);
this.twoNetworksToolStripMenuItem.Text = "Two Networks"; this.twoNetworksToolStripMenuItem.Text = "Two Networks";
this.twoNetworksToolStripMenuItem.Click += new System.EventHandler(this.twoNetworksToolStripMenuItem_Click); this.twoNetworksToolStripMenuItem.Click += new System.EventHandler(this.twoNetworksToolStripMenuItem_Click);
// //
// threeNetworksToolStripMenuItem // threeNetworksToolStripMenuItem
// //
this.threeNetworksToolStripMenuItem.Name = "threeNetworksToolStripMenuItem"; this.threeNetworksToolStripMenuItem.Name = "threeNetworksToolStripMenuItem";
this.threeNetworksToolStripMenuItem.Size = new System.Drawing.Size(181, 24); this.threeNetworksToolStripMenuItem.Size = new System.Drawing.Size(187, 26);
this.threeNetworksToolStripMenuItem.Text = "Three Networks"; this.threeNetworksToolStripMenuItem.Text = "Three Networks";
this.threeNetworksToolStripMenuItem.Click += new System.EventHandler(this.threeNetworksToolStripMenuItem_Click); this.threeNetworksToolStripMenuItem.Click += new System.EventHandler(this.threeNetworksToolStripMenuItem_Click);
// //
// firewallsToolStripMenuItem // firewallsToolStripMenuItem
// //
this.firewallsToolStripMenuItem.Name = "firewallsToolStripMenuItem"; this.firewallsToolStripMenuItem.Name = "firewallsToolStripMenuItem";
this.firewallsToolStripMenuItem.Size = new System.Drawing.Size(181, 24); this.firewallsToolStripMenuItem.Size = new System.Drawing.Size(187, 26);
this.firewallsToolStripMenuItem.Text = "Firewalls"; this.firewallsToolStripMenuItem.Text = "Firewalls";
this.firewallsToolStripMenuItem.Click += new System.EventHandler(this.firewallsToolStripMenuItem_Click); this.firewallsToolStripMenuItem.Click += new System.EventHandler(this.firewallsToolStripMenuItem_Click);
// //
@ -346,41 +346,41 @@
this.SolvedThreeNetworksToolStripMenuItem, this.SolvedThreeNetworksToolStripMenuItem,
this.firewallsToolStripMenuItem1}); this.firewallsToolStripMenuItem1});
this.toSolveToolStripMenuItem.Name = "toSolveToolStripMenuItem"; this.toSolveToolStripMenuItem.Name = "toSolveToolStripMenuItem";
this.toSolveToolStripMenuItem.Size = new System.Drawing.Size(135, 24); this.toSolveToolStripMenuItem.Size = new System.Drawing.Size(140, 26);
this.toSolveToolStripMenuItem.Text = "To Solve"; this.toSolveToolStripMenuItem.Text = "To Solve";
// //
// solvedDHCPToolStripMenuItem // solvedDHCPToolStripMenuItem
// //
this.solvedDHCPToolStripMenuItem.Name = "solvedDHCPToolStripMenuItem"; this.solvedDHCPToolStripMenuItem.Name = "solvedDHCPToolStripMenuItem";
this.solvedDHCPToolStripMenuItem.Size = new System.Drawing.Size(181, 24); this.solvedDHCPToolStripMenuItem.Size = new System.Drawing.Size(187, 26);
this.solvedDHCPToolStripMenuItem.Text = "DHCP"; this.solvedDHCPToolStripMenuItem.Text = "DHCP";
this.solvedDHCPToolStripMenuItem.Click += new System.EventHandler(this.solvedDHCPToolStripMenuItem_Click); this.solvedDHCPToolStripMenuItem.Click += new System.EventHandler(this.solvedDHCPToolStripMenuItem_Click);
// //
// solvedOneNetworkToolStripMenuItem // solvedOneNetworkToolStripMenuItem
// //
this.solvedOneNetworkToolStripMenuItem.Name = "solvedOneNetworkToolStripMenuItem"; this.solvedOneNetworkToolStripMenuItem.Name = "solvedOneNetworkToolStripMenuItem";
this.solvedOneNetworkToolStripMenuItem.Size = new System.Drawing.Size(181, 24); this.solvedOneNetworkToolStripMenuItem.Size = new System.Drawing.Size(187, 26);
this.solvedOneNetworkToolStripMenuItem.Text = "One Network"; this.solvedOneNetworkToolStripMenuItem.Text = "One Network";
this.solvedOneNetworkToolStripMenuItem.Click += new System.EventHandler(this.solvedOneNetworkToolStripMenuItem_Click); this.solvedOneNetworkToolStripMenuItem.Click += new System.EventHandler(this.solvedOneNetworkToolStripMenuItem_Click);
// //
// solvedTwoNetworksToolStripMenuItem // solvedTwoNetworksToolStripMenuItem
// //
this.solvedTwoNetworksToolStripMenuItem.Name = "solvedTwoNetworksToolStripMenuItem"; this.solvedTwoNetworksToolStripMenuItem.Name = "solvedTwoNetworksToolStripMenuItem";
this.solvedTwoNetworksToolStripMenuItem.Size = new System.Drawing.Size(181, 24); this.solvedTwoNetworksToolStripMenuItem.Size = new System.Drawing.Size(187, 26);
this.solvedTwoNetworksToolStripMenuItem.Text = "Two Networks"; this.solvedTwoNetworksToolStripMenuItem.Text = "Two Networks";
this.solvedTwoNetworksToolStripMenuItem.Click += new System.EventHandler(this.solvedTwoNetworksToolStripMenuItem_Click); this.solvedTwoNetworksToolStripMenuItem.Click += new System.EventHandler(this.solvedTwoNetworksToolStripMenuItem_Click);
// //
// SolvedThreeNetworksToolStripMenuItem // SolvedThreeNetworksToolStripMenuItem
// //
this.SolvedThreeNetworksToolStripMenuItem.Name = "SolvedThreeNetworksToolStripMenuItem"; this.SolvedThreeNetworksToolStripMenuItem.Name = "SolvedThreeNetworksToolStripMenuItem";
this.SolvedThreeNetworksToolStripMenuItem.Size = new System.Drawing.Size(181, 24); this.SolvedThreeNetworksToolStripMenuItem.Size = new System.Drawing.Size(187, 26);
this.SolvedThreeNetworksToolStripMenuItem.Text = "Three Networks"; this.SolvedThreeNetworksToolStripMenuItem.Text = "Three Networks";
this.SolvedThreeNetworksToolStripMenuItem.Click += new System.EventHandler(this.SolvedThreeNetworksToolStripMenuItem_Click); this.SolvedThreeNetworksToolStripMenuItem.Click += new System.EventHandler(this.SolvedThreeNetworksToolStripMenuItem_Click);
// //
// firewallsToolStripMenuItem1 // firewallsToolStripMenuItem1
// //
this.firewallsToolStripMenuItem1.Name = "firewallsToolStripMenuItem1"; this.firewallsToolStripMenuItem1.Name = "firewallsToolStripMenuItem1";
this.firewallsToolStripMenuItem1.Size = new System.Drawing.Size(181, 24); this.firewallsToolStripMenuItem1.Size = new System.Drawing.Size(187, 26);
this.firewallsToolStripMenuItem1.Text = "Firewalls"; this.firewallsToolStripMenuItem1.Text = "Firewalls";
this.firewallsToolStripMenuItem1.Click += new System.EventHandler(this.firewallsToolStripMenuItem1_Click); this.firewallsToolStripMenuItem1.Click += new System.EventHandler(this.firewallsToolStripMenuItem1_Click);
// //
@ -398,11 +398,13 @@
// //
this.lbMessages.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) this.lbMessages.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.lbMessages.Font = new System.Drawing.Font("Courier New", 8F);
this.lbMessages.FormattingEnabled = true; this.lbMessages.FormattingEnabled = true;
this.lbMessages.Location = new System.Drawing.Point(74, 331); this.lbMessages.ItemHeight = 16;
this.lbMessages.Location = new System.Drawing.Point(74, 329);
this.lbMessages.Margin = new System.Windows.Forms.Padding(2); this.lbMessages.Margin = new System.Windows.Forms.Padding(2);
this.lbMessages.Name = "lbMessages"; this.lbMessages.Name = "lbMessages";
this.lbMessages.Size = new System.Drawing.Size(366, 43); this.lbMessages.Size = new System.Drawing.Size(366, 52);
this.lbMessages.TabIndex = 3; this.lbMessages.TabIndex = 3;
this.lbMessages.DoubleClick += new System.EventHandler(this.lbMessages_DoubleClick); this.lbMessages.DoubleClick += new System.EventHandler(this.lbMessages_DoubleClick);
// //
@ -410,7 +412,7 @@
// //
this.lblStatus.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) this.lblStatus.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.lblStatus.Location = new System.Drawing.Point(74, 374); this.lblStatus.Location = new System.Drawing.Point(74, 400);
this.lblStatus.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); this.lblStatus.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.lblStatus.Name = "lblStatus"; this.lblStatus.Name = "lblStatus";
this.lblStatus.Size = new System.Drawing.Size(365, 14); this.lblStatus.Size = new System.Drawing.Size(365, 14);
@ -515,7 +517,7 @@
// myProgressBar // myProgressBar
// //
this.myProgressBar.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.myProgressBar.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.myProgressBar.Location = new System.Drawing.Point(10, 330); this.myProgressBar.Location = new System.Drawing.Point(10, 329);
this.myProgressBar.Margin = new System.Windows.Forms.Padding(2); this.myProgressBar.Margin = new System.Windows.Forms.Padding(2);
this.myProgressBar.Name = "myProgressBar"; this.myProgressBar.Name = "myProgressBar";
this.myProgressBar.Size = new System.Drawing.Size(59, 19); this.myProgressBar.Size = new System.Drawing.Size(59, 19);
@ -526,7 +528,7 @@
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(463, 386); this.ClientSize = new System.Drawing.Size(463, 412);
this.Controls.Add(this.myProgressBar); this.Controls.Add(this.myProgressBar);
this.Controls.Add(this.lblStatus); this.Controls.Add(this.lblStatus);
this.Controls.Add(this.lbMessages); this.Controls.Add(this.lbMessages);

View File

@ -436,7 +436,7 @@ namespace EduNetworkBuilder
NetworkDevice nd = mynet.GetDeviceFromID(myID); NetworkDevice nd = mynet.GetDeviceFromID(myID);
string hostname = NB.Translate("NC_NoHost"); string hostname = NB.Translate("NC_NoHost");
if (nd != null) hostname = nd.hostname; if (nd != null) hostname = nd.hostname;
nPacket.Tracking.Status = hostname + string.Format(NB.Translate("NC_NoIPOnSubStr"), hostname, nPacket.destIP.GetIPString); nPacket.Tracking.Status = NB.LeftPad(hostname) + string.Format(NB.Translate("NC_NoIPOnSubStr"), hostname, nPacket.destIP.GetIPString);
nPacket.MyStatus = PacketStatus.finished_failed; nPacket.MyStatus = PacketStatus.finished_failed;
return false; return false;
} }
@ -491,7 +491,7 @@ namespace EduNetworkBuilder
NetworkDevice nd = mynet.GetDeviceFromID(myID); NetworkDevice nd = mynet.GetDeviceFromID(myID);
string hostname = NB.Translate("NC_NoHost"); string hostname = NB.Translate("NC_NoHost");
if (nd != null) hostname = nd.hostname; if (nd != null) hostname = nd.hostname;
nPacket.Tracking.Status = hostname + string.Format(NB.Translate("NC_NoIPOnSubStr"), nPacket.destIP.GetIPString); nPacket.Tracking.Status = NB.LeftPad(hostname) + string.Format(NB.Translate("NC_NoIPOnSubStr"), nPacket.destIP.GetIPString);
nPacket.MyStatus = PacketStatus.finished_failed; nPacket.MyStatus = PacketStatus.finished_failed;
return false; return false;
} }
@ -557,7 +557,7 @@ namespace EduNetworkBuilder
NetworkDevice nd = mynet.GetDeviceFromID(myID); NetworkDevice nd = mynet.GetDeviceFromID(myID);
string hostname = NB.Translate("NC_NoHost"); string hostname = NB.Translate("NC_NoHost");
if (nd != null) hostname = nd.hostname; if (nd != null) hostname = nd.hostname;
nPacket.Tracking.Status = hostname + String.Format(NB.Translate("NC_NoIPOnSubStr"), nPacket.destIP.GetIPString); nPacket.Tracking.Status = NB.LeftPad(hostname) + String.Format(NB.Translate("NC_NoIPOnSubStr"), nPacket.destIP.GetIPString);
nPacket.MyStatus = PacketStatus.finished_failed; nPacket.MyStatus = PacketStatus.finished_failed;
return false; return false;
} }
@ -675,7 +675,7 @@ namespace EduNetworkBuilder
nd = mynet.GetDeviceFromID(myID); nd = mynet.GetDeviceFromID(myID);
string hostname = NB.Translate("NC_NoHost"); string hostname = NB.Translate("NC_NoHost");
if (nd != null) hostname = nd.hostname; if (nd != null) hostname = nd.hostname;
tPacket.Tracking.Status = hostname + " " + NB.Translate("NC_ProcessInboundPacket_DifferentMachine3"); tPacket.Tracking.Status = NB.LeftPad(hostname) + " " + NB.Translate("NC_ProcessInboundPacket_DifferentMachine3");
tPacket.MyStatus = PacketStatus.finished_failed; tPacket.MyStatus = PacketStatus.finished_failed;
} }
} }

View File

@ -1199,18 +1199,18 @@ namespace EduNetworkBuilder
{ {
if(ipc.What == PacketType.dhcp_request) if(ipc.What == PacketType.dhcp_request)
{ {
//Console.WriteLine(hostname + ": packet=" + tPacket.MyType.ToString()); //Console.WriteLine(NB.LeftPad(hostname) + ": packet=" + tPacket.MyType.ToString());
//Console.WriteLine(" " + hostname + ": d:" + ipc.destIP.GetIPString + " s:" + tPacket.sourceIP.GetIPString); //Console.WriteLine(" " + NB.LeftPad(hostname) + ": d:" + ipc.destIP.GetIPString + " s:" + tPacket.sourceIP.GetIPString);
//if (HasBroadcastAddress(ipc.destIP)) //if (HasBroadcastAddress(ipc.destIP))
// Console.WriteLine(" Broadcast"); // Console.WriteLine(" Broadcast");
} }
if(ipc.destIP.GetIP == tPacket.sourceIP.GetIP || HasBroadcastAddress(ipc.destIP)) if (ipc.destIP.GetIP == tPacket.sourceIP.GetIP || HasBroadcastAddress(ipc.destIP))
{ {
if (ipc.What == PacketType.arp_request && tPacket.MyType == PacketType.arp_answer) if (ipc.What == PacketType.arp_request && tPacket.MyType == PacketType.arp_answer)
typesMatch = true; typesMatch = true;
if (ipc.What == PacketType.dhcp_request && tPacket.MyType == PacketType.dhcp_answer) if (ipc.What == PacketType.dhcp_request && tPacket.MyType == PacketType.dhcp_answer)
{ {
//Console.WriteLine(" " + hostname + ": True"); //Console.WriteLine(" " + NB.LeftPad(hostname) + ": True");
typesMatch = true; typesMatch = true;
} }
if (ipc.What == PacketType.ping_request && tPacket.MyType == PacketType.ping_answer) if (ipc.What == PacketType.ping_request && tPacket.MyType == PacketType.ping_answer)
@ -1539,7 +1539,7 @@ namespace EduNetworkBuilder
nPacket.Tracking = new PacketMessage(); nPacket.Tracking = new PacketMessage();
myNet.addPacket(nPacket); myNet.addPacket(nPacket);
tPacket.AddMessage(DebugLevel.info, NB.Translate("ND_ProcessArrival_PingReached1")); tPacket.AddMessage(DebugLevel.info, NB.Translate("ND_ProcessArrival_PingReached1"));
tPacket.Tracking.Status = hostname + ":\tPing" + NB.Translate("ND_ProcessArrival_PingReached1") + tPacket.sourceIP.GetIP.ToIpString() + "-> " + tPacket.destIP.GetIP.ToIpString(); tPacket.Tracking.Status = NB.LeftPad(hostname) + " Ping " + NB.Translate("ND_ProcessArrival_PingReached1") + tPacket.sourceIP.GetIP.ToIpString() + "-> " + tPacket.destIP.GetIP.ToIpString();
tPacket.MyStatus = PacketStatus.finished_ok; tPacket.MyStatus = PacketStatus.finished_ok;
IPAddress tip = nPacket.sourceIP; IPAddress tip = nPacket.sourceIP;
if (!HasBroadcastAddress(tPacket.destIP)) if (!HasBroadcastAddress(tPacket.destIP))
@ -1581,7 +1581,7 @@ namespace EduNetworkBuilder
else else
{ {
tPacket.AddMessage(DebugLevel.info, NB.Translate("ND_ProssArr_PingErr")); tPacket.AddMessage(DebugLevel.info, NB.Translate("ND_ProssArr_PingErr"));
tPacket.Tracking.Status = hostname + ":\t" + string.Format(NB.Translate("ND_ProssArr_PingErr")) + tPacket.sourceIP.GetIP.ToIpString() + " -> " + hostname; tPacket.Tracking.Status = NB.LeftPad(hostname) + " " + string.Format(NB.Translate("ND_ProssArr_PingErr")) + tPacket.sourceIP.GetIP.ToIpString() + " -> " + hostname;
tPacket.MyStatus = PacketStatus.finished_ok; tPacket.MyStatus = PacketStatus.finished_ok;
} }
return; return;
@ -1595,13 +1595,13 @@ namespace EduNetworkBuilder
{ {
tPacket.AddMessage(DebugLevel.info, string.Format(NB.Translate("ND_ProssArrSomeLostStr"), tPacket.health.ToString()) ); tPacket.AddMessage(DebugLevel.info, string.Format(NB.Translate("ND_ProssArrSomeLostStr"), tPacket.health.ToString()) );
int left = 100 - tPacket.health; int left = 100 - tPacket.health;
tPacket.Tracking.Status = hostname + ":\t" + string.Format(NB.Translate("ND_ProssArrPartialStr"), left , tPacket.sourceIP.GetIP.ToIpString(),tPacket.destIP.GetIP.ToIpString()); tPacket.Tracking.Status = NB.LeftPad(hostname) + " " + string.Format(NB.Translate("ND_ProssArrPartialStr"), left , tPacket.sourceIP.GetIP.ToIpString(),tPacket.destIP.GetIP.ToIpString());
tPacket.MyStatus = PacketStatus.finished_ok; tPacket.MyStatus = PacketStatus.finished_ok;
} }
else else
{ {
tPacket.AddMessage(DebugLevel.info, NB.Translate("ND_ProcessArrival_PingReturn1")); tPacket.AddMessage(DebugLevel.info, NB.Translate("ND_ProcessArrival_PingReturn1"));
tPacket.Tracking.Status = hostname + ":\t" + string.Format(NB.Translate("ND_ProssArrSuccessStr"), tPacket.sourceIP.GetIP.ToIpString(), tPacket.destIP.GetIP.ToIpString()); tPacket.Tracking.Status = NB.LeftPad(hostname) + " " + string.Format(NB.Translate("ND_ProssArrSuccessStr"), tPacket.sourceIP.GetIP.ToIpString(), tPacket.destIP.GetIP.ToIpString());
tPacket.MyStatus = PacketStatus.finished_ok; tPacket.MyStatus = PacketStatus.finished_ok;
if (tPacket.sourceIP.GetIP != 0) if (tPacket.sourceIP.GetIP != 0)
{ {
@ -1616,7 +1616,7 @@ namespace EduNetworkBuilder
else else
{ {
tPacket.AddMessage(DebugLevel.info, NB.Translate("ND_ProcessArrival_PackReturnErr1")); tPacket.AddMessage(DebugLevel.info, NB.Translate("ND_ProcessArrival_PackReturnErr1"));
tPacket.Tracking.Status = hostname + ":\t" + string.Format(NB.Translate("ND_ProssArrPngFailStr"), tPacket.sourceIP.GetIP.ToIpString(), tPacket.destIP.GetIP.ToIpString()); tPacket.Tracking.Status = NB.LeftPad(hostname) + " " + string.Format(NB.Translate("ND_ProssArrPngFailStr"), tPacket.sourceIP.GetIP.ToIpString(), tPacket.destIP.GetIP.ToIpString());
tPacket.MyStatus = PacketStatus.finished_failed; tPacket.MyStatus = PacketStatus.finished_failed;
} }
return; return;
@ -1668,7 +1668,7 @@ namespace EduNetworkBuilder
nPacket.MyStatus = PacketStatus.processing; nPacket.MyStatus = PacketStatus.processing;
tPacket.AddMessage(DebugLevel.info, NB.Translate("ND_ProcessArrival_ArpReached1")); tPacket.AddMessage(DebugLevel.info, NB.Translate("ND_ProcessArrival_ArpReached1"));
tPacket.Tracking.Status = hostname + ":\t" + string.Format(NB.Translate("ND_ProssArrArp")) + "IP: " + tPacket.sourceIP.GetIPString + " MAC: "+ nPacket.sourceMAC; tPacket.Tracking.Status = NB.LeftPad(hostname) + " " + string.Format(NB.Translate("ND_ProssArrArp")) + "IP: " + tPacket.sourceIP.GetIPString + " MAC: "+ nPacket.sourceMAC;
tPacket.MyStatus = PacketStatus.finished_ok; tPacket.MyStatus = PacketStatus.finished_ok;
} }
else else
@ -1686,14 +1686,14 @@ namespace EduNetworkBuilder
NetworkCard nic = LocalNic(tPacket.destIP); NetworkCard nic = LocalNic(tPacket.destIP);
HostNicID myid = nic.myID; HostNicID myid = nic.myID;
StoreArp(tPacket.sourceMAC, tPacket.TsourceIP.GetIP.ToIpString(), myid); StoreArp(tPacket.sourceMAC, tPacket.TsourceIP.GetIP.ToIpString(), myid);
tPacket.Tracking.Status = hostname + ":\t" + string.Format(NB.Translate("ND_ProssArrArpSuccessStr"), tPacket.sourceIP.GetIP.ToIpString(), tPacket.sourceIP.GetIP.ToIpString(), tPacket.sourceMAC); tPacket.Tracking.Status = NB.LeftPad(hostname) + " " + string.Format(NB.Translate("ND_ProssArrArpSuccessStr"), tPacket.sourceIP.GetIP.ToIpString(), tPacket.sourceIP.GetIP.ToIpString(), tPacket.sourceMAC);
tPacket.MyStatus = PacketStatus.finished_ok; //Yay! tPacket.MyStatus = PacketStatus.finished_ok; //Yay!
myNet.NotePacketArrived(tPacket.MyType, this, tPacket.destIP, tPacket.sourceIP); myNet.NotePacketArrived(tPacket.MyType, this, tPacket.destIP, tPacket.sourceIP);
} }
else else
{ {
tPacket.AddMessage(DebugLevel.info, NB.Translate("ND_ProcessArrival_PackReturnErr1")); tPacket.AddMessage(DebugLevel.info, NB.Translate("ND_ProcessArrival_PackReturnErr1"));
tPacket.Tracking.Status = hostname + ":\t" + string.Format(NB.Translate("ND_ProssArrArpFailStr"), tPacket.sourceIP.GetIP.ToIpString(), tPacket.destIP.GetIP.ToIpString()); tPacket.Tracking.Status = NB.LeftPad(hostname) + " " + string.Format(NB.Translate("ND_ProssArrArpFailStr"), tPacket.sourceIP.GetIP.ToIpString(), tPacket.destIP.GetIP.ToIpString());
tPacket.MyStatus = PacketStatus.finished_failed; tPacket.MyStatus = PacketStatus.finished_failed;
} }
return; return;
@ -1742,7 +1742,7 @@ namespace EduNetworkBuilder
IPAddress tIP = HubManagementIP(); IPAddress tIP = HubManagementIP();
if (tIP != null) IP = tIP.GetIPString; if (tIP != null) IP = tIP.GetIPString;
} }
tPacket.Tracking.Status = hostname + ":\t" + string.Format(NB.Translate("ND_ProssArrDHCPStr"), IP); tPacket.Tracking.Status = NB.LeftPad(hostname) + " " + string.Format(NB.Translate("ND_ProssArrDHCPStr"), IP);
//If we are a wireless router, we need to keep passing the broadcast request on //If we are a wireless router, we need to keep passing the broadcast request on
if(!DoesForwarding()) if(!DoesForwarding())
tPacket.MyStatus = PacketStatus.finished_ok; tPacket.MyStatus = PacketStatus.finished_ok;
@ -1762,7 +1762,7 @@ namespace EduNetworkBuilder
tPacket.payloadIP = new IPAddress(NB.ZeroIPString); tPacket.payloadIP = new IPAddress(NB.ZeroIPString);
tnic.SetIPForDHCP(tPacket.payloadIP); tnic.SetIPForDHCP(tPacket.payloadIP);
IsDirty = true; //If we need to redraw the device IP IsDirty = true; //If we need to redraw the device IP
tPacket.Tracking.Status = hostname + ":\t" + string.Format(NB.Translate("ND_ProssArrDHCPAnsStr"), tPacket.payloadIP.GetIP.ToIpString()); tPacket.Tracking.Status = NB.LeftPad(hostname) + " " + string.Format(NB.Translate("ND_ProssArrDHCPAnsStr"), tPacket.payloadIP.GetIP.ToIpString());
tPacket.MyStatus = PacketStatus.finished_ok; //Yay! tPacket.MyStatus = PacketStatus.finished_ok; //Yay!
myNet.NotePacketArrived(tPacket.MyType, this, tPacket.payloadIP, tPacket.sourceIP); myNet.NotePacketArrived(tPacket.MyType, this, tPacket.payloadIP, tPacket.sourceIP);
return; return;
@ -1774,7 +1774,7 @@ namespace EduNetworkBuilder
string sIP = "?.?.?.?"; string sIP = "?.?.?.?";
if (tPacket.sourceIP != null) if (tPacket.sourceIP != null)
sIP = tPacket.sourceIP.GetIP.ToIpString(); sIP = tPacket.sourceIP.GetIP.ToIpString();
tPacket.Tracking.Status = hostname + ":\t" + string.Format(NB.Translate("ND_ProssArrDHCPFailStr"), sIP, tPacket.destIP.GetIP.ToIpString()); tPacket.Tracking.Status = NB.LeftPad(hostname) + " " + string.Format(NB.Translate("ND_ProssArrDHCPFailStr"), sIP, tPacket.destIP.GetIP.ToIpString());
tPacket.MyStatus = PacketStatus.finished_failed; tPacket.MyStatus = PacketStatus.finished_failed;
} }
return; return;
@ -1983,15 +1983,15 @@ namespace EduNetworkBuilder
{ {
if (tPacket.MyType == PacketType.dhcp_answer) if (tPacket.MyType == PacketType.dhcp_answer)
{ {
tPacket.AddMessage(DebugLevel.info, hostname + " " + string.Format(NB.Translate("ND_PrepPackGtewyErr")) + " " + tPacket.OutboundIP.GetIP.ToIpString()); tPacket.AddMessage(DebugLevel.info, NB.LeftPad(hostname) + " " + string.Format(NB.Translate("ND_PrepPackGtewyErr")) + " " + tPacket.OutboundIP.GetIP.ToIpString());
tPacket.Tracking.Status = hostname + " " + string.Format(NB.Translate("ND_PrepPackGtewyErr")); tPacket.Tracking.Status = NB.LeftPad(hostname) + " " + string.Format(NB.Translate("ND_PrepPackGtewyErr"));
tPacket.MyStatus = PacketStatus.finished_failed; tPacket.MyStatus = PacketStatus.finished_failed;
return false; return false;
} }
else else
{ {
tPacket.AddMessage(DebugLevel.info, hostname + " " + string.Format(NB.Translate("ND_PrepPackRoutErr")) +" "+ tPacket.OutboundIP.GetIP.ToIpString()); tPacket.AddMessage(DebugLevel.info, NB.LeftPad(hostname) + " " + string.Format(NB.Translate("ND_PrepPackRoutErr")) +" "+ tPacket.OutboundIP.GetIP.ToIpString());
tPacket.Tracking.Status = hostname + " " + NB.Translate("ND_PrepPackRoutErr"); tPacket.Tracking.Status = NB.LeftPad(hostname) + " " + NB.Translate("ND_PrepPackRoutErr");
tPacket.MyStatus = PacketStatus.finished_failed; tPacket.MyStatus = PacketStatus.finished_failed;
return false; return false;
} }
@ -2004,8 +2004,8 @@ namespace EduNetworkBuilder
tPacket.OutboundNic = LocalNic(tPacket.OutboundIP); tPacket.OutboundNic = LocalNic(tPacket.OutboundIP);
if (tPacket.OutboundNic == null) if (tPacket.OutboundNic == null)
{ {
tPacket.AddMessage(DebugLevel.info, hostname + " " + string.Format(NB.Translate("ND_PrepPackNICErr")) + " :"+ tPacket.OutboundIP.GetIP.ToIpString()); tPacket.AddMessage(DebugLevel.info, NB.LeftPad(hostname) + " " + string.Format(NB.Translate("ND_PrepPackNICErr")) + " :"+ tPacket.OutboundIP.GetIP.ToIpString());
tPacket.Tracking.Status = hostname + " " + NB.Translate("ND_PrepPackNICErr"); tPacket.Tracking.Status = NB.LeftPad(hostname) + " " + NB.Translate("ND_PrepPackNICErr");
tPacket.MyStatus = PacketStatus.finished_failed; tPacket.MyStatus = PacketStatus.finished_failed;
return false; return false;
} }
@ -2016,8 +2016,8 @@ namespace EduNetworkBuilder
tPacket.OutboundIF = tPacket.OutboundNic.LocalInterface(tPacket.OutboundIP, tPacket.Tracking); tPacket.OutboundIF = tPacket.OutboundNic.LocalInterface(tPacket.OutboundIP, tPacket.Tracking);
if (tPacket.OutboundIF == null) if (tPacket.OutboundIF == null)
{ {
tPacket.AddMessage(DebugLevel.info, hostname + " " + string.Format(NB.Translate("ND_PrepPackRoutErr")) + " :" + tPacket.OutboundIP.GetIP.ToIpString()); tPacket.AddMessage(DebugLevel.info, NB.LeftPad(hostname) + " " + string.Format(NB.Translate("ND_PrepPackRoutErr")) + " :" + tPacket.OutboundIP.GetIP.ToIpString());
tPacket.Tracking.Status = hostname + " " + NB.Translate("ND_PrepPackRoutErr"); tPacket.Tracking.Status = NB.LeftPad(hostname) + " " + NB.Translate("ND_PrepPackRoutErr");
tPacket.MyStatus = PacketStatus.finished_failed; tPacket.MyStatus = PacketStatus.finished_failed;
return false; return false;
} }
@ -2194,7 +2194,7 @@ namespace EduNetworkBuilder
if(nc == null) if(nc == null)
{ {
tPacket.AddMessage(DebugLevel.info, NB.Translate("ND_DoInputFromLink_CardFail1")); tPacket.AddMessage(DebugLevel.info, NB.Translate("ND_DoInputFromLink_CardFail1"));
tPacket.Tracking.Status = hostname + " " + string.Format(NB.Translate("ND_DoInputFromLink_CardFail2")); tPacket.Tracking.Status = NB.LeftPad(hostname) + " " + string.Format(NB.Translate("ND_DoInputFromLink_CardFail2"));
tPacket.MyStatus = PacketStatus.finished_failed; tPacket.MyStatus = PacketStatus.finished_failed;
return; return;
} }
@ -2233,16 +2233,16 @@ namespace EduNetworkBuilder
{ {
if (tPacket.MyType == PacketType.dhcp_request && !isDHCPServer) if (tPacket.MyType == PacketType.dhcp_request && !isDHCPServer)
{ {
tPacket.AddMessage(DebugLevel.debug, hostname + " " +string.Format(NB.Translate("ND_DoInFromLnkDeaf"))); tPacket.AddMessage(DebugLevel.debug, NB.LeftPad(hostname) + " " +string.Format(NB.Translate("ND_DoInFromLnkDeaf")));
tPacket.Tracking.Status = hostname +" " + string.Format(NB.Translate("ND_DoInFromLnkNoDHCP")); tPacket.Tracking.Status = NB.LeftPad(hostname) + " " + string.Format(NB.Translate("ND_DoInFromLnkNoDHCP"));
tPacket.MyStatus = PacketStatus.finished_failed; tPacket.MyStatus = PacketStatus.finished_failed;
return; return;
} }
if ((tPacket.MyType == PacketType.ping_answer || tPacket.MyType== PacketType.ping_request) && if ((tPacket.MyType == PacketType.ping_answer || tPacket.MyType== PacketType.ping_request) &&
!RoutesPackets() && (!HasIPAddress(tPacket.destIP) && !HasBroadcastAddress(tPacket.destIP))) !RoutesPackets() && (!HasIPAddress(tPacket.destIP) && !HasBroadcastAddress(tPacket.destIP)))
{ {
tPacket.AddMessage(DebugLevel.debug, hostname + " " +string.Format(NB.Translate("ND_NotRouter"))); tPacket.AddMessage(DebugLevel.debug, NB.LeftPad(hostname) + " " +string.Format(NB.Translate("ND_NotRouter")));
tPacket.Tracking.Status = hostname + " " + string.Format(NB.Translate("ND_NotRouter2")); tPacket.Tracking.Status = NB.LeftPad(hostname) + " " + string.Format(NB.Translate("ND_NotRouter2"));
tPacket.MyStatus = PacketStatus.finished_failed; tPacket.MyStatus = PacketStatus.finished_failed;
return; return;
} }
@ -2251,8 +2251,8 @@ namespace EduNetworkBuilder
myType != NetworkComponentType.wbridge && myType != NetworkComponentType.wrepeater && myType != NetworkComponentType.wbridge && myType != NetworkComponentType.wrepeater &&
myType != NetworkComponentType.wrouter) myType != NetworkComponentType.wrouter)
{ {
tPacket.AddMessage(DebugLevel.debug, hostname + string.Format(NB.Translate("ND_NoLocIP"))); tPacket.AddMessage(DebugLevel.debug, NB.LeftPad(hostname) + string.Format(NB.Translate("ND_NoLocIP")));
tPacket.Tracking.Status = hostname + " " + string.Format(NB.Translate("ND_NoLocIP2")); tPacket.Tracking.Status = NB.LeftPad(hostname) + " " + string.Format(NB.Translate("ND_NoLocIP2"));
tPacket.MyStatus = PacketStatus.finished_failed; tPacket.MyStatus = PacketStatus.finished_failed;
return; return;
} }

View File

@ -331,7 +331,7 @@ namespace EduNetworkBuilder
if(movingTo == null) if(movingTo == null)
{ {
tPacket.AddMessage(DebugLevel.info, NB.Translate("NL_DoMoveNoEnd")); tPacket.AddMessage(DebugLevel.info, NB.Translate("NL_DoMoveNoEnd"));
tPacket.Tracking.Status = hostname + string.Format(NB.Translate("NL_DoMoveNoEnd2")); tPacket.Tracking.Status = NB.LeftPad(hostname) + string.Format(NB.Translate("NL_DoMoveNoEnd2"));
tPacket.MyStatus = PacketStatus.finished_failed; tPacket.MyStatus = PacketStatus.finished_failed;
} }
else else

View File

@ -262,7 +262,7 @@ namespace EduNetworkBuilder
{ {
//No more arps going. We do not have an answer! //No more arps going. We do not have an answer!
Tracking.AddMessage(DebugLevel.info, WhereAmI, NB.Translate("P_ProcessTick") + ": "+ dest.GetIP.ToIpString()); Tracking.AddMessage(DebugLevel.info, WhereAmI, NB.Translate("P_ProcessTick") + ": "+ dest.GetIP.ToIpString());
Tracking.Status = WhereAmI.hostname + NB.Translate("P_ProcessTick"); Tracking.Status = NB.LeftPad(WhereAmI.hostname) + NB.Translate("P_ProcessTick");
MyStatus = PacketStatus.finished_failed; MyStatus = PacketStatus.finished_failed;
} }
return; return;

View File

@ -88,7 +88,7 @@ namespace EduNetworkBuilder
{ {
if((tmessage.WhatLevel | tLevel) == tLevel) if((tmessage.WhatLevel | tLevel) == tLevel)
{ {
tString = tmessage.HostName + " \t" + tmessage.WhatLevel.ToString() + "\t" + tmessage.Message; tString = NB.LeftPad(tmessage.HostName) + " " + NB.LeftPad(tmessage.WhatLevel.ToString()) + " " + tmessage.Message;
answer.Add(tString); answer.Add(tString);
} }
} }
@ -100,7 +100,7 @@ namespace EduNetworkBuilder
List<string> answer = new List<string>(); List<string> answer = new List<string>();
string tString; string tString;
int time = duration.Seconds * 1000 + duration.Milliseconds; int time = duration.Seconds * 1000 + duration.Milliseconds;
tString = time.ToString() + " ms " + Status; tString = NB.LeftPad(time.ToString() + "ms ", 10) + Status;
answer.Add(tString); answer.Add(tString);
return answer; return answer;
} }

View File

@ -1,10 +1,11 @@
{\rtf1\ansi\ansicpg1252\deff0\nouicompat\deflang1033\deflangfe1033{\fonttbl{\f0\fswiss\fprq2\fcharset0 Calibri;}} {\rtf1\ansi\ansicpg1252\deff0\nouicompat\deflang1033\deflangfe1033{\fonttbl{\f0\fswiss\fprq2\fcharset0 Calibri;}}
{\*\generator Riched20 10.0.10240}{\*\mmathPr\mnaryLim0\mdispDef1\mwrapIndent1440 }\viewkind4\uc1 {\*\generator Riched20 10.0.10240}{\*\mmathPr\mdispDef1\mwrapIndent1440 }\viewkind4\uc1
\pard\nowidctlpar\sa200\sl276\slmult1\b\f0\fs22\lang9 Version 1.0.25\par \pard\nowidctlpar\sa200\sl276\slmult1\b\f0\fs22\lang9 Version 1.0.25\par
\b0 * Minor changes to help file\par \b0 * Minor changes to help file\par
* Fixed size of labels on IP-Address editor box\par * Fixed size of labels on IP-Address editor box\par
* Hide gateway label when we do not need it. (ip-address editor)\par * Hide gateway label when we do not need it. (ip-address editor)\par
* rename "mixed network" puzzle to be "adding devices" (the puzzle was about adding devices)\b\par * rename "mixed network" puzzle to be "adding devices" (the puzzle was about adding devices)\par
* Changed layout of many messages\b\par
Version 1.0.24 \par Version 1.0.24 \par
\b0 * Add sound when ctrl-s is pressed so we know we saved.\par \b0 * Add sound when ctrl-s is pressed so we know we saved.\par
* Add sound fail when save is canceled (will use it later if ctrl-s fails)\par * Add sound fail when save is canceled (will use it later if ctrl-s fails)\par

View File

@ -215,7 +215,7 @@
</data> </data>
<data name="_Solved" xml:space="preserve"> <data name="_Solved" xml:space="preserve">
<value>Solved</value> <value>Solved</value>
<comment>NetworkBuilder solvedToolStripMenuItem = Solved</comment> <comment>_Solved = Solved</comment>
</data> </data>
<data name="_DHCP" xml:space="preserve"> <data name="_DHCP" xml:space="preserve">
<value>DHCP</value> <value>DHCP</value>
@ -227,11 +227,11 @@
</data> </data>
<data name="NB_TwoNetworks" xml:space="preserve"> <data name="NB_TwoNetworks" xml:space="preserve">
<value>Two Networks</value> <value>Two Networks</value>
<comment>NetworkBuilder twoNetworksToolStripMenuItem = Two Networks</comment> <comment>NetworkBuilder solvedTwoNetworksToolStripMenuItem = Two Networks</comment>
</data> </data>
<data name="NB_ThreeNetworks" xml:space="preserve"> <data name="NB_ThreeNetworks" xml:space="preserve">
<value>Three Networks</value> <value>Three Networks</value>
<comment>NetworkBuilder threeNetworksToolStripMenuItem = Three Networks</comment> <comment>NetworkBuilder SolvedThreeNetworksToolStripMenuItem = Three Networks</comment>
</data> </data>
<data name="NB_Firewalls" xml:space="preserve"> <data name="NB_Firewalls" xml:space="preserve">
<value>Firewalls</value> <value>Firewalls</value>
@ -241,14 +241,6 @@
<value>To Solve</value> <value>To Solve</value>
<comment>NetworkBuilder toSolveToolStripMenuItem = To Solve</comment> <comment>NetworkBuilder toSolveToolStripMenuItem = To Solve</comment>
</data> </data>
<data name="NB_TwoNetworks" xml:space="preserve">
<value>Two Networks</value>
<comment>NetworkBuilder solvedTwoNetworksToolStripMenuItem = Two Networks</comment>
</data>
<data name="NB_ThreeNetworks" xml:space="preserve">
<value>Three Networks</value>
<comment>NetworkBuilder SolvedThreeNetworksToolStripMenuItem = Three Networks</comment>
</data>
<data name="NB_lblStatus" xml:space="preserve"> <data name="NB_lblStatus" xml:space="preserve">
<value>lblStatus</value> <value>lblStatus</value>
<comment>NetworkBuilder lblStatus = lblStatus</comment> <comment>NetworkBuilder lblStatus = lblStatus</comment>
@ -771,7 +763,7 @@
</data> </data>
<data name="ND_ProssArr_PingErr" xml:space="preserve"> <data name="ND_ProssArr_PingErr" xml:space="preserve">
<value>The broadcast ping reached a destination that was not on the same network</value> <value>The broadcast ping reached a destination that was not on the same network</value>
<comment>Network Device ProcessArrival PingErr1 = The broadcast ping reached a destination that was not on the same network</comment> <comment>ND_ProssArr_PingErr = The broadcast ping reached a destination that was not on the same network</comment>
</data> </data>
<data name="ND_ProcessArrival_PingReached1" xml:space="preserve"> <data name="ND_ProcessArrival_PingReached1" xml:space="preserve">
<value>Success! The ping reached the destination.</value> <value>Success! The ping reached the destination.</value>
@ -1153,10 +1145,6 @@
<value>Solved! Would you like to open the puzzle box to go to the next puzzle? 'No' will let you continue to play with this one.</value> <value>Solved! Would you like to open the puzzle box to go to the next puzzle? 'No' will let you continue to play with this one.</value>
<comment>N_MarkAsSolvedDone = Solved! Would you like to open the puzzle box to go to the next puzzle? 'No' will let you continue to play with this one.</comment> <comment>N_MarkAsSolvedDone = Solved! Would you like to open the puzzle box to go to the next puzzle? 'No' will let you continue to play with this one.</comment>
</data> </data>
<data name="_Solved" xml:space="preserve">
<value>Solved</value>
<comment>_Solved = Solved</comment>
</data>
<data name="N_ProssPackDone" xml:space="preserve"> <data name="N_ProssPackDone" xml:space="preserve">
<value>----All Done----</value> <value>----All Done----</value>
<comment>N_ProssPackDone = ----All Done----</comment> <comment>N_ProssPackDone = ----All Done----</comment>
@ -1381,10 +1369,6 @@
<value>DHCP Request found Server: {0}</value> <value>DHCP Request found Server: {0}</value>
<comment>ND_ProssArrDHCPStr = DHCP Request found Server: {0}</comment> <comment>ND_ProssArrDHCPStr = DHCP Request found Server: {0}</comment>
</data> </data>
<data name="ND_ProssArr_PingErr" xml:space="preserve">
<value>The broadcast ping reached a destination that was not on the same network</value>
<comment>ND_ProssArr_PingErr = The broadcast ping reached a destination that was not on the same network</comment>
</data>
<data name="ND_ProssArrPartialStr" xml:space="preserve"> <data name="ND_ProssArrPartialStr" xml:space="preserve">
<value>Ping partial success: {0}% packet loss. {1} -&gt; {2}</value> <value>Ping partial success: {0}% packet loss. {1} -&gt; {2}</value>
<comment>ND_ProssArrPartialStr = Ping partial success: {0}% packet loss. {1} -&gt; {2}</comment> <comment>ND_ProssArrPartialStr = Ping partial success: {0}% packet loss. {1} -&gt; {2}</comment>