Nice message if we try to change the gateway on a device that is managed via DHCP

This commit is contained in:
timy committed 2017-10-24 11:44:24 -05:00
1 parent 856d0885f2
commit 67210c4d1e
2 files changed
+13 -2

No files matched your search

+9 -2
View File
@@ -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();
}
}
}
@@ -1965,4 +1965,8 @@
<value>Translate</value>
<comment>TW_Translate = Translate</comment>
</data>
<data name="DC_CannotEditGateway_DHCP" xml:space="preserve">
<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>
</data>
</root>