Nice message if we try to change the gateway on a device that is managed via DHCP
This commit is contained in:
@ -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>
|
Reference in New Issue
Block a user