diff --git a/EduNetworkBuilder/IPAddressEntry.cs b/EduNetworkBuilder/IPAddressEntry.cs index b2ded60..7d8aae6 100644 --- a/EduNetworkBuilder/IPAddressEntry.cs +++ b/EduNetworkBuilder/IPAddressEntry.cs @@ -22,6 +22,7 @@ namespace EduNetworkBuilder Point StartLocation = new Point (50,50); NB_IPAddress SavedIPAddress = null; + ToolTip myTooltip = new ToolTip(); public IPAddressEntry(NB_IPAddress toEdit, NetworkDevice ToEdit, Form ParentForm, bool JustPinging=false) @@ -271,5 +272,27 @@ namespace EduNetworkBuilder if (tLocation.X < 0 || tLocation.Y < 0) tLocation = new Point(50, 50); Location = tLocation; } + + public void ShowAsSubnetGateway() + { + lblIP.Text = NB.Translate("IPE_Network"); + Text = NB.Translate("NB_Subnet"); + + myTooltip.AutoPopDelay = 5000; + myTooltip.InitialDelay = 1000; + myTooltip.ReshowDelay = 500; + // Force the ToolTip text to be displayed whether or not the form is active. + myTooltip.ShowAlways = true; + + myTooltip.SetToolTip(tbIPAddress, NB.Translate("IPE_NetworkTooltip")); + myTooltip.SetToolTip(tbGateway, NB.Translate("IPE_GatewayTooltip")); + myTooltip.SetToolTip(tbNetmask, NB.Translate("IPE_NetmaskTooltip")); + + myTooltip.SetToolTip(lblIP, NB.Translate("IPE_NetworkTooltip")); + myTooltip.SetToolTip(lblGateway, NB.Translate("IPE_GatewayTooltip")); + myTooltip.SetToolTip(lblNetmask, NB.Translate("IPE_NetmaskTooltip")); + + ShowDialog(); + } } }