LBW Translate Done

This commit is contained in:
Peter Wilson 2015-11-16 14:59:53 -06:00
parent bddf95ad8d
commit 680210ecb5
2 changed files with 70 additions and 14 deletions

View File

@ -39,8 +39,8 @@ namespace EduNetworkBuilder
lblInstructions.Text = NB.Translate("LBW_LBWFilter"); lblInstructions.Text = NB.Translate("LBW_LBWFilter");
panelCheckboxes.SuspendLayout(); panelCheckboxes.SuspendLayout();
string SelectedTag = GetSelectedTag(); string SelectedTag = GetSelectedTag();
if (SelectedTag == "ALL") if (SelectedTag == NB.Translate("LBW_LBWALL"))
Text = Text + "(All Solved)"; Text = Text + NB.Translate("LBW_LBWAllS");
foreach (string str in NB.GetPuzzleTags()) foreach (string str in NB.GetPuzzleTags())
{ {
newCB = AddCheckBox(count, str); newCB = AddCheckBox(count, str);
@ -55,8 +55,8 @@ namespace EduNetworkBuilder
count++; count++;
} }
panelCheckboxes.ResumeLayout(); panelCheckboxes.ResumeLayout();
btnOK.Text = "Load"; btnOK.Text = NB.Translate("LBW_LBWLoad");
btnAdd.Text = "Cancel"; btnAdd.Text = NB.Translate("LBW_LBWCancel");
btnAdd.Visible = true; btnAdd.Visible = true;
cbLoadPuzzlesAtStart.Checked = Properties.Settings.Default.AutoStartPuzzles; cbLoadPuzzlesAtStart.Checked = Properties.Settings.Default.AutoStartPuzzles;
UpdateForm(); UpdateForm();
@ -74,7 +74,7 @@ namespace EduNetworkBuilder
{ {
MyMode = LBContents.routes; MyMode = LBContents.routes;
myNetDevice = MasterDevice; myNetDevice = MasterDevice;
lblInstructions.Text = "Double-click a route to change it."; lblInstructions.Text = NB.Translate("LBW_LBWDblClckRout");
lbWindowData.Font = new System.Drawing.Font("Courier New", 8); lbWindowData.Font = new System.Drawing.Font("Courier New", 8);
btnAdd.Visible = true; btnAdd.Visible = true;
} }
@ -82,7 +82,7 @@ namespace EduNetworkBuilder
{ {
MyMode = LBContents.dhcp; MyMode = LBContents.dhcp;
myNetDevice = MasterDevice; myNetDevice = MasterDevice;
lblInstructions.Text = "Double-Click the interface to add/edit the range of DHCP to serve."; lblInstructions.Text = NB.Translate("LBW_LBWDblClckIf");
lbWindowData.Font = new System.Drawing.Font("Courier New", 8); lbWindowData.Font = new System.Drawing.Font("Courier New", 8);
btnAdd.Visible = false; btnAdd.Visible = false;
} }
@ -102,7 +102,7 @@ namespace EduNetworkBuilder
UpdateForm(); UpdateForm();
btnAdd.Visible = false; btnAdd.Visible = false;
int count=0; int count=0;
lblInstructions.Text = "For greater detail, click on the check-boxes"; lblInstructions.Text = NB.Translate("LBW_LBWDetail");
panelCheckboxes.SuspendLayout(); panelCheckboxes.SuspendLayout();
foreach (string str in Enum.GetNames(typeof(DebugLevel))) foreach (string str in Enum.GetNames(typeof(DebugLevel)))
{ {
@ -159,7 +159,7 @@ namespace EduNetworkBuilder
return "Level_" + PI.Level; return "Level_" + PI.Level;
} }
} }
return "ALL"; return NB.Translate("LBW_LBWALL");
} }
private void UpdateForm() private void UpdateForm()
@ -183,10 +183,10 @@ namespace EduNetworkBuilder
} }
if(MyMode == LBContents.routes) if(MyMode == LBContents.routes)
{ {
itemstrings.Add("--Static Routes (Read/Write)--"); itemstrings.Add(NB.Translate("LBW_UpdateFormStatRout"));
itemstrings.AddRange(myNetDevice.DeviceRouteStrings()); itemstrings.AddRange(myNetDevice.DeviceRouteStrings());
EditableCount = itemstrings.Count(); EditableCount = itemstrings.Count();
itemstrings.Add("--Routes from NICs (Read-Only)--"); itemstrings.Add(NB.Translate("LBW_UpdateFormNICRout"));
itemstrings.AddRange(myNetDevice.NICRouteStrings()); itemstrings.AddRange(myNetDevice.NICRouteStrings());
foreach (string str in itemstrings) foreach (string str in itemstrings)
{ {
@ -349,7 +349,7 @@ namespace EduNetworkBuilder
private void AddRoute() private void AddRoute()
{ {
IPAddress newip = new IPAddress(NB.ZeroIPString, NB.ZeroIPString, NB.ZeroIPString); IPAddress newip = new IPAddress(NB.ZeroIPString, NB.ZeroIPString, NB.ZeroIPString);
newip.Edit(myNetDevice,"Create Route"); newip.Edit(myNetDevice,NB.Translate("LBW_AddRouteCreate"));
myNetDevice.AddRoute(newip); myNetDevice.AddRoute(newip);
UpdateForm(); UpdateForm();
} }
@ -401,9 +401,9 @@ namespace EduNetworkBuilder
lbWindowData.ContextMenuStrip = new ContextMenuStrip(); lbWindowData.ContextMenuStrip = new ContextMenuStrip();
} }
lbWindowData.ContextMenuStrip.Items.Clear(); lbWindowData.ContextMenuStrip.Items.Clear();
lbWindowData.ContextMenuStrip.Items.Add("Edit"); lbWindowData.ContextMenuStrip.Items.Add(NB.Translate("LBW_LBWEdit"));
lbWindowData.ContextMenuStrip.Items[index++].Click += lbWindowData_Edit_Click; lbWindowData.ContextMenuStrip.Items[index++].Click += lbWindowData_Edit_Click;
lbWindowData.ContextMenuStrip.Items.Add("Delete"); lbWindowData.ContextMenuStrip.Items.Add(NB.Translate("LBW_LBWDelete"));
lbWindowData.ContextMenuStrip.Items[index++].Click += lbWindowData_Delete_Click; lbWindowData.ContextMenuStrip.Items[index++].Click += lbWindowData_Delete_Click;
} }
} }
@ -427,7 +427,7 @@ namespace EduNetworkBuilder
{ {
if (Properties.Settings.Default.ScoreList == null) if (Properties.Settings.Default.ScoreList == null)
Properties.Settings.Default.ScoreList = new System.Collections.Specialized.StringCollection(); Properties.Settings.Default.ScoreList = new System.Collections.Specialized.StringCollection();
DialogResult answer = MessageBox.Show("Are sure you want to forget what puzzles you have done?", "Forget Puzzles?", MessageBoxButtons.YesNo); DialogResult answer = MessageBox.Show(NB.Translate("LBW_btnResetYouSure?"), NB.Translate("LBW_btnResetForget?"), MessageBoxButtons.YesNo);
if (answer == System.Windows.Forms.DialogResult.Yes) if (answer == System.Windows.Forms.DialogResult.Yes)
{ {
Properties.Settings.Default.ScoreList.Clear(); Properties.Settings.Default.ScoreList.Clear();

View File

@ -897,4 +897,60 @@
<value>Filter the puzzles by checking one the boxes.</value> <value>Filter the puzzles by checking one the boxes.</value>
<comment>LBW_LBWFilter = Filter the puzzles by checking one the boxes.</comment> <comment>LBW_LBWFilter = Filter the puzzles by checking one the boxes.</comment>
</data> </data>
<data name="LBW_AddRouteCreate" xml:space="preserve">
<value>Create Route</value>
<comment>LBW_AddRouteCreate = Create Route</comment>
</data>
<data name="LBW_btnResetForget?" xml:space="preserve">
<value>Forget Puzzles?</value>
<comment>LBW_btnResetForget? = Forget Puzzles?</comment>
</data>
<data name="LBW_btnResetYouSure?" xml:space="preserve">
<value>Are sure you want to forget what puzzles you have done?</value>
<comment>LBW_btnResetYouSure? = Are sure you want to forget what puzzles you have done?</comment>
</data>
<data name="LBW_LBWALL" xml:space="preserve">
<value>ALL</value>
<comment>LBT_LBWALL = ALL</comment>
</data>
<data name="LBW_LBWAllS" xml:space="preserve">
<value>(All Solved)</value>
<comment>LBT_LBWAllS = (All Solved)</comment>
</data>
<data name="LBW_LBWCancel" xml:space="preserve">
<value>Cancel</value>
<comment>LBW_LBWCancel = Cancel</comment>
</data>
<data name="LBW_LBWDblClckIf" xml:space="preserve">
<value>Double-Click the interface to add/edit the range of DHCP to serve.</value>
<comment>LBW_LBWDblClckIf = Double-Click the interface to add/edit the range of DHCP to serve.</comment>
</data>
<data name="LBW_LBWDblClckRout" xml:space="preserve">
<value>Double-click a route to change it.</value>
<comment>LBW_LBWDblClckRout = Double-click a route to change it.</comment>
</data>
<data name="LBW_LBWDelete" xml:space="preserve">
<value>Delete</value>
<comment>LBW_LBWDelete = Delete</comment>
</data>
<data name="LBW_LBWDetail" xml:space="preserve">
<value>For greater detail, click on the check-boxes</value>
<comment>LBW_LBWDetail = For greater detail, click on the check-boxes</comment>
</data>
<data name="LBW_LBWEdit" xml:space="preserve">
<value>Edit</value>
<comment>LBW_LBWEdit = Edit</comment>
</data>
<data name="LBW_LBWLoad" xml:space="preserve">
<value>Load</value>
<comment>LBW_LBWLoad = Load</comment>
</data>
<data name="LBW_UpdateFormNICRout" xml:space="preserve">
<value>--Routes from NICs (Read-Only)--</value>
<comment>LBW_UpdateFormNICRout = --Routes from NICs (Read-Only)--</comment>
</data>
<data name="LBW_UpdateFormStatRout" xml:space="preserve">
<value>--Static Routes (Read/Write)--</value>
<comment>LBW_UpdateFormStatRout = --Static Routes (Read/Write)--</comment>
</data>
</root> </root>