From 67210c4d1e6ec12b26199bf113964b0d041f2488 Mon Sep 17 00:00:00 2001 From: Tim Young Date: Tue, 24 Oct 2017 11:44:24 -0500 Subject: [PATCH] Nice message if we try to change the gateway on a device that is managed via DHCP --- EduNetworkBuilder/DeviceConfig.cs | 11 +++++++++-- EduNetworkBuilder/Resources/languages/edustrings.resx | 4 ++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/EduNetworkBuilder/DeviceConfig.cs b/EduNetworkBuilder/DeviceConfig.cs index 9e7babc..6b70d36 100644 --- a/EduNetworkBuilder/DeviceConfig.cs +++ b/EduNetworkBuilder/DeviceConfig.cs @@ -483,8 +483,15 @@ namespace EduNetworkBuilder if (NB.GetComponentType(ClonedItem) == GeneralComponentType.device) { NetworkDevice nd = (NetworkDevice)ClonedItem; - nd.EditGateway(this); - UpdateForm(); + if (nd.HasDHCPNic()) + { + MessageBox.Show(NB.Translate("DC_CannotEditGateway_DHCP")); + } + else + { + nd.EditGateway(this); + UpdateForm(); + } } } diff --git a/EduNetworkBuilder/Resources/languages/edustrings.resx b/EduNetworkBuilder/Resources/languages/edustrings.resx index 030aafe..c6b7561 100644 --- a/EduNetworkBuilder/Resources/languages/edustrings.resx +++ b/EduNetworkBuilder/Resources/languages/edustrings.resx @@ -1965,4 +1965,8 @@ Translate TW_Translate = Translate + + 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. + 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. + \ No newline at end of file