Save NIC data when we are doing editing. In particular, if we put a VPN password in and then clicked the endpoint, the password was reset. Save the password.

This commit is contained in:
Tim Young 2017-06-20 15:36:26 -05:00
parent 26b33b46be
commit 29e6d64614

View File

@ -172,15 +172,20 @@ namespace EduNetworkBuilder
{
MyNicToEdit.CanUseDHCP = cbCanUseDHCP.Checked;
MyNicToEdit.UsesDHCP = cbDHCP.Checked;
SaveDataToNic();
Close();
}
private void SaveDataToNic()
{
if (tbVPNEncrypt != null)
{
MyNicToEdit.EncryptionKey = tbVPNEncrypt.Text;
}
if(tbSSID != null)
if (tbSSID != null)
{
MyNicToEdit.SSID = tbSSID.Text;
}
Close();
}
private void btnVPNEnd_Click(object sender, EventArgs e)
@ -192,6 +197,7 @@ namespace EduNetworkBuilder
MyNicToEdit.TunnelEndpoint = new IPAddress(NB.ZeroIPString, "255.255.255.0", IPAddressType.ip_only);
}
MyNicToEdit.TunnelEndpoint.Edit(nd, this, NB.Translate("_Endpt"));
SaveDataToNic();
UpdateForm();
}