Add a localized URL for any map we want to add a URL to

This commit is contained in:
Tim Young 2017-10-25 10:05:11 -05:00
parent db56e53268
commit f929e84d29
5 changed files with 91 additions and 13 deletions

View File

@ -52,12 +52,14 @@
this.cb_ColoredPackets = new System.Windows.Forms.CheckBox(); this.cb_ColoredPackets = new System.Windows.Forms.CheckBox();
this.cbCaptions = new System.Windows.Forms.ComboBox(); this.cbCaptions = new System.Windows.Forms.ComboBox();
this.lblCaptions = new System.Windows.Forms.Label(); this.lblCaptions = new System.Windows.Forms.Label();
this.lblVidURL = new System.Windows.Forms.Label();
this.tbVidURL = new System.Windows.Forms.TextBox();
this.SuspendLayout(); this.SuspendLayout();
// //
// btnDone // btnDone
// //
this.btnDone.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.btnDone.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnDone.Location = new System.Drawing.Point(755, 275); this.btnDone.Location = new System.Drawing.Point(755, 307);
this.btnDone.Name = "btnDone"; this.btnDone.Name = "btnDone";
this.btnDone.Size = new System.Drawing.Size(75, 23); this.btnDone.Size = new System.Drawing.Size(75, 23);
this.btnDone.TabIndex = 0; this.btnDone.TabIndex = 0;
@ -267,12 +269,30 @@
this.lblCaptions.TabIndex = 24; this.lblCaptions.TabIndex = 24;
this.lblCaptions.Text = "Display Titles"; this.lblCaptions.Text = "Display Titles";
// //
// lblVidURL
//
this.lblVidURL.AutoSize = true;
this.lblVidURL.Location = new System.Drawing.Point(38, 310);
this.lblVidURL.Name = "lblVidURL";
this.lblVidURL.Size = new System.Drawing.Size(76, 17);
this.lblVidURL.TabIndex = 25;
this.lblVidURL.Text = "Video URL";
//
// tbVidURL
//
this.tbVidURL.Location = new System.Drawing.Point(186, 307);
this.tbVidURL.Name = "tbVidURL";
this.tbVidURL.Size = new System.Drawing.Size(556, 22);
this.tbVidURL.TabIndex = 26;
//
// OptionsWindow // OptionsWindow
// //
this.AcceptButton = this.btnDone; this.AcceptButton = this.btnDone;
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(836, 307); this.ClientSize = new System.Drawing.Size(836, 339);
this.Controls.Add(this.tbVidURL);
this.Controls.Add(this.lblVidURL);
this.Controls.Add(this.lblCaptions); this.Controls.Add(this.lblCaptions);
this.Controls.Add(this.cbCaptions); this.Controls.Add(this.cbCaptions);
this.Controls.Add(this.cb_ColoredPackets); this.Controls.Add(this.cb_ColoredPackets);
@ -331,5 +351,7 @@
private System.Windows.Forms.CheckBox cb_ColoredPackets; private System.Windows.Forms.CheckBox cb_ColoredPackets;
private System.Windows.Forms.ComboBox cbCaptions; private System.Windows.Forms.ComboBox cbCaptions;
private System.Windows.Forms.Label lblCaptions; private System.Windows.Forms.Label lblCaptions;
private System.Windows.Forms.Label lblVidURL;
private System.Windows.Forms.TextBox tbVidURL;
} }
} }

View File

@ -46,8 +46,9 @@ namespace EduNetworkBuilder
myToolTip.SetToolTip(tbLevel, NB.Translate("OW_OWLevel")); myToolTip.SetToolTip(tbLevel, NB.Translate("OW_OWLevel"));
myToolTip.SetToolTip(lblSortOrder, NB.Translate("OW_OWSort")); myToolTip.SetToolTip(lblSortOrder, NB.Translate("OW_OWSort"));
myToolTip.SetToolTip(tbSortOrder, NB.Translate("OW_OWSort")); myToolTip.SetToolTip(tbSortOrder, NB.Translate("OW_OWSort"));
myToolTip.SetToolTip(cbVLANs, NB.Translate("OW_OWVLANs"));
myToolTip.SetToolTip(cb_ColoredPackets, NB.Translate("OW_OWVLANColoredPacketsTT")); myToolTip.SetToolTip(cb_ColoredPackets, NB.Translate("OW_OWVLANColoredPacketsTT"));
myToolTip.SetToolTip(cbVLANs, NB.Translate("OW_OWVLANs"));
myToolTip.SetToolTip(tbVidURL, NB.Translate("OW_OWVidURL"));
LoadValuesFromNetwork(); LoadValuesFromNetwork();
Icon = Properties.Resources.NBIco; Icon = Properties.Resources.NBIco;
} }
@ -77,6 +78,7 @@ namespace EduNetworkBuilder
lblStartingHelp.Text = NB.Translate("OW_lblStartingHelp"); lblStartingHelp.Text = NB.Translate("OW_lblStartingHelp");
cbVLANs.Text = NB.Translate("OW_cbVLANs"); cbVLANs.Text = NB.Translate("OW_cbVLANs");
cb_ColoredPackets.Text = NB.Translate("OW_OWVLANColoredPackets"); cb_ColoredPackets.Text = NB.Translate("OW_OWVLANColoredPackets");
lblVidURL.Text = NB.Translate("OW_VidURL");
Text = NB.Translate("OW_Form"); Text = NB.Translate("OW_Form");
} }
@ -93,6 +95,7 @@ namespace EduNetworkBuilder
tbItemSize.Text = myNet.itemsize.ToString(); tbItemSize.Text = myNet.itemsize.ToString();
tbMessage.Text = myNet.NetMessage.GetText(); tbMessage.Text = myNet.NetMessage.GetText();
tbNetworkTitle.Text = myNet.NetTitle.GetText(); tbNetworkTitle.Text = myNet.NetTitle.GetText();
tbVidURL.Text = myNet.NetURL.GetText();
//select the Caption Level item we have defined. //select the Caption Level item we have defined.
List<string> CaptionItemList = CaptionOptionList(); List<string> CaptionItemList = CaptionOptionList();
@ -137,6 +140,7 @@ namespace EduNetworkBuilder
int.TryParse(tbItemSize.Text, out myNet.itemsize); int.TryParse(tbItemSize.Text, out myNet.itemsize);
myNet.NetMessage.Add( tbMessage.Text); myNet.NetMessage.Add( tbMessage.Text);
myNet.NetTitle.Add(tbNetworkTitle.Text); myNet.NetTitle.Add(tbNetworkTitle.Text);
myNet.NetURL.Add(tbVidURL.Text);
List<string> CaptionItemList = CaptionOptionList(); List<string> CaptionItemList = CaptionOptionList();
int index = cbCaptions.SelectedIndex; int index = cbCaptions.SelectedIndex;

View File

@ -1969,6 +1969,14 @@
<value>This device uses DHCP to configure its network settings. The gateway is set through the DHCP server, and will be updated when this device requests DHCP. If the gateway is wrong, make sure the gateway on the server is properly set.</value> <value>This device uses DHCP to configure its network settings. The gateway is set through the DHCP server, and will be updated when this device requests DHCP. If the gateway is wrong, make sure the gateway on the server is properly set.</value>
<comment>This device uses DHCP to configure its network settings. The gateway is set through the DHCP server, and will be updated when this device requests DHCP. If the gateway is wrong, make sure the gateway on the server is properly set.</comment> <comment>This device uses DHCP to configure its network settings. The gateway is set through the DHCP server, and will be updated when this device requests DHCP. If the gateway is wrong, make sure the gateway on the server is properly set.</comment>
</data> </data>
<data name="OW_OWVidURL" xml:space="preserve">
<value>If there is a video for students for this puzzle, put the URL here</value>
<comment>OW_OWVidURL = If there is a video for students for this puzzle, put the URL here</comment>
</data>
<data name="OW_VidURL" xml:space="preserve">
<value>Video URL</value>
<comment>OW_VidURL = Video URL</comment>
</data>
<data name="TW_Form" xml:space="preserve"> <data name="TW_Form" xml:space="preserve">
<value>Program</value> <value>Program</value>
<comment>TW_Form = Program</comment> <comment>TW_Form = Program</comment>

View File

@ -40,6 +40,8 @@
this.tcTabPages = new System.Windows.Forms.TabControl(); this.tcTabPages = new System.Windows.Forms.TabControl();
this.tpMessageTitle = new System.Windows.Forms.TabPage(); this.tpMessageTitle = new System.Windows.Forms.TabPage();
this.tpFormStuff = new System.Windows.Forms.TabPage(); this.tpFormStuff = new System.Windows.Forms.TabPage();
this.tb2URL = new System.Windows.Forms.TextBox();
this.tb1URL = new System.Windows.Forms.TextBox();
this.tcTabPages.SuspendLayout(); this.tcTabPages.SuspendLayout();
this.tpMessageTitle.SuspendLayout(); this.tpMessageTitle.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
@ -60,7 +62,7 @@
this.tb1Message.Location = new System.Drawing.Point(6, 39); this.tb1Message.Location = new System.Drawing.Point(6, 39);
this.tb1Message.Multiline = true; this.tb1Message.Multiline = true;
this.tb1Message.Name = "tb1Message"; this.tb1Message.Name = "tb1Message";
this.tb1Message.Size = new System.Drawing.Size(713, 181); this.tb1Message.Size = new System.Drawing.Size(438, 164);
this.tb1Message.TabIndex = 10; this.tb1Message.TabIndex = 10;
this.tb1Message.Leave += new System.EventHandler(this.tb1Message_Leave); this.tb1Message.Leave += new System.EventHandler(this.tb1Message_Leave);
// //
@ -72,7 +74,7 @@
this.tb2Message.Location = new System.Drawing.Point(6, 266); this.tb2Message.Location = new System.Drawing.Point(6, 266);
this.tb2Message.Multiline = true; this.tb2Message.Multiline = true;
this.tb2Message.Name = "tb2Message"; this.tb2Message.Name = "tb2Message";
this.tb2Message.Size = new System.Drawing.Size(713, 162); this.tb2Message.Size = new System.Drawing.Size(438, 143);
this.tb2Message.TabIndex = 12; this.tb2Message.TabIndex = 12;
this.tb2Message.Leave += new System.EventHandler(this.tb2Message_Leave); this.tb2Message.Leave += new System.EventHandler(this.tb2Message_Leave);
// //
@ -88,7 +90,7 @@
// btnClose // btnClose
// //
this.btnClose.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.btnClose.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnClose.Location = new System.Drawing.Point(368, 484); this.btnClose.Location = new System.Drawing.Point(390, 488);
this.btnClose.Name = "btnClose"; this.btnClose.Name = "btnClose";
this.btnClose.Size = new System.Drawing.Size(75, 23); this.btnClose.Size = new System.Drawing.Size(75, 23);
this.btnClose.TabIndex = 13; this.btnClose.TabIndex = 13;
@ -99,7 +101,7 @@
// btnSave // btnSave
// //
this.btnSave.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.btnSave.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.btnSave.Location = new System.Drawing.Point(12, 484); this.btnSave.Location = new System.Drawing.Point(12, 488);
this.btnSave.Name = "btnSave"; this.btnSave.Name = "btnSave";
this.btnSave.Size = new System.Drawing.Size(75, 23); this.btnSave.Size = new System.Drawing.Size(75, 23);
this.btnSave.TabIndex = 14; this.btnSave.TabIndex = 14;
@ -111,7 +113,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)));
this.lblStatus.AutoSize = true; this.lblStatus.AutoSize = true;
this.lblStatus.Location = new System.Drawing.Point(139, 487); this.lblStatus.Location = new System.Drawing.Point(139, 491);
this.lblStatus.Name = "lblStatus"; this.lblStatus.Name = "lblStatus";
this.lblStatus.Size = new System.Drawing.Size(48, 17); this.lblStatus.Size = new System.Drawing.Size(48, 17);
this.lblStatus.TabIndex = 15; this.lblStatus.TabIndex = 15;
@ -123,7 +125,7 @@
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.tb1Title.Location = new System.Drawing.Point(172, 11); this.tb1Title.Location = new System.Drawing.Point(172, 11);
this.tb1Title.Name = "tb1Title"; this.tb1Title.Name = "tb1Title";
this.tb1Title.Size = new System.Drawing.Size(547, 22); this.tb1Title.Size = new System.Drawing.Size(272, 22);
this.tb1Title.TabIndex = 16; this.tb1Title.TabIndex = 16;
this.tb1Title.Leave += new System.EventHandler(this.tb1Title_Leave); this.tb1Title.Leave += new System.EventHandler(this.tb1Title_Leave);
// //
@ -133,7 +135,7 @@
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.tb2Title.Location = new System.Drawing.Point(172, 236); this.tb2Title.Location = new System.Drawing.Point(172, 236);
this.tb2Title.Name = "tb2Title"; this.tb2Title.Name = "tb2Title";
this.tb2Title.Size = new System.Drawing.Size(547, 22); this.tb2Title.Size = new System.Drawing.Size(272, 22);
this.tb2Title.TabIndex = 17; this.tb2Title.TabIndex = 17;
this.tb2Title.Leave += new System.EventHandler(this.tb2Title_Leave); this.tb2Title.Leave += new System.EventHandler(this.tb2Title_Leave);
// //
@ -147,11 +149,13 @@
this.tcTabPages.Location = new System.Drawing.Point(7, 6); this.tcTabPages.Location = new System.Drawing.Point(7, 6);
this.tcTabPages.Name = "tcTabPages"; this.tcTabPages.Name = "tcTabPages";
this.tcTabPages.SelectedIndex = 0; this.tcTabPages.SelectedIndex = 0;
this.tcTabPages.Size = new System.Drawing.Size(436, 463); this.tcTabPages.Size = new System.Drawing.Size(458, 467);
this.tcTabPages.TabIndex = 18; this.tcTabPages.TabIndex = 18;
// //
// tpMessageTitle // tpMessageTitle
// //
this.tpMessageTitle.Controls.Add(this.tb1URL);
this.tpMessageTitle.Controls.Add(this.tb2URL);
this.tpMessageTitle.Controls.Add(this.tb1Title); this.tpMessageTitle.Controls.Add(this.tb1Title);
this.tpMessageTitle.Controls.Add(this.tb2Title); this.tpMessageTitle.Controls.Add(this.tb2Title);
this.tpMessageTitle.Controls.Add(this.tb2Message); this.tpMessageTitle.Controls.Add(this.tb2Message);
@ -161,7 +165,7 @@
this.tpMessageTitle.Location = new System.Drawing.Point(4, 25); this.tpMessageTitle.Location = new System.Drawing.Point(4, 25);
this.tpMessageTitle.Name = "tpMessageTitle"; this.tpMessageTitle.Name = "tpMessageTitle";
this.tpMessageTitle.Padding = new System.Windows.Forms.Padding(3); this.tpMessageTitle.Padding = new System.Windows.Forms.Padding(3);
this.tpMessageTitle.Size = new System.Drawing.Size(726, 434); this.tpMessageTitle.Size = new System.Drawing.Size(450, 438);
this.tpMessageTitle.TabIndex = 0; this.tpMessageTitle.TabIndex = 0;
this.tpMessageTitle.Text = "Messages"; this.tpMessageTitle.Text = "Messages";
this.tpMessageTitle.UseVisualStyleBackColor = true; this.tpMessageTitle.UseVisualStyleBackColor = true;
@ -176,11 +180,27 @@
this.tpFormStuff.Text = "Forms"; this.tpFormStuff.Text = "Forms";
this.tpFormStuff.UseVisualStyleBackColor = true; this.tpFormStuff.UseVisualStyleBackColor = true;
// //
// tb2URL
//
this.tb2URL.Location = new System.Drawing.Point(6, 413);
this.tb2URL.Name = "tb2URL";
this.tb2URL.Size = new System.Drawing.Size(438, 22);
this.tb2URL.TabIndex = 18;
this.tb2URL.Leave += new System.EventHandler(this.tb2URL_Leave);
//
// tb1URL
//
this.tb1URL.Location = new System.Drawing.Point(6, 208);
this.tb1URL.Name = "tb1URL";
this.tb1URL.Size = new System.Drawing.Size(438, 22);
this.tb1URL.TabIndex = 19;
this.tb1URL.Leave += new System.EventHandler(this.tb1URL_Leave);
//
// TranslationWindow // TranslationWindow
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(464, 519); this.ClientSize = new System.Drawing.Size(486, 523);
this.Controls.Add(this.lblStatus); this.Controls.Add(this.lblStatus);
this.Controls.Add(this.btnSave); this.Controls.Add(this.btnSave);
this.Controls.Add(this.btnClose); this.Controls.Add(this.btnClose);
@ -211,5 +231,7 @@
private System.Windows.Forms.TabControl tcTabPages; private System.Windows.Forms.TabControl tcTabPages;
private System.Windows.Forms.TabPage tpMessageTitle; private System.Windows.Forms.TabPage tpMessageTitle;
private System.Windows.Forms.TabPage tpFormStuff; private System.Windows.Forms.TabPage tpFormStuff;
private System.Windows.Forms.TextBox tb1URL;
private System.Windows.Forms.TextBox tb2URL;
} }
} }

View File

@ -130,6 +130,7 @@ namespace EduNetworkBuilder
{ {
tb1Message.Text = myNet.NetMessage.GetText(What); tb1Message.Text = myNet.NetMessage.GetText(What);
tb1Title.Text = myNet.NetTitle.GetText(What); tb1Title.Text = myNet.NetTitle.GetText(What);
tb1URL.Text = myNet.NetURL.GetText(What);
} }
} }
@ -140,6 +141,7 @@ namespace EduNetworkBuilder
{ {
tb2Message.Text = myNet.NetMessage.GetText(What); tb2Message.Text = myNet.NetMessage.GetText(What);
tb2Title.Text = myNet.NetTitle.GetText(What); tb2Title.Text = myNet.NetTitle.GetText(What);
tb2URL.Text = myNet.NetURL.GetText(What);
} }
} }
@ -194,5 +196,25 @@ namespace EduNetworkBuilder
} }
RefreshContents(); RefreshContents();
} }
private void tb1URL_Leave(object sender, EventArgs e)
{
string What = CodeFromLang(cb1Language.Text);
if (What != "")
{
myNet.NetURL.ChangeText(What, tb1URL.Text);
}
RefreshContents();
}
private void tb2URL_Leave(object sender, EventArgs e)
{
string What = CodeFromLang(cb2Language.Text);
if (What != "")
{
myNet.NetURL.ChangeText(What, tb2URL.Text);
}
RefreshContents();
}
} }
} }