allow DHCP range to cancel

The problem is easily seen most times when a DHCP range is canceled.
       The cancel completely fails to work, and refuses to cancel until
       correct values are put in start and end. (However, pressing the ESC
       key sometimes helped.)
This commit is contained in:
Tim Young 2019-02-23 12:20:24 -06:00
parent 06eb896558
commit 886e1d7911
2 changed files with 7 additions and 0 deletions

View File

@ -103,6 +103,7 @@
this.btnCancel.Text = "Cancel";
this.btnCancel.UseVisualStyleBackColor = true;
this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
this.btnCancel.CausesValidation = false;
//
// btnOK
//

View File

@ -194,6 +194,8 @@ namespace EduNetworkBuilder
private void tbGateway_Validating(object sender, CancelEventArgs e)
{
if (!WellDone) return;
Network mynet = NB.GetNetwork();
if (ParentDevice != null)
{
@ -221,6 +223,8 @@ namespace EduNetworkBuilder
private void tbNetmask_Validating(object sender, CancelEventArgs e)
{
if (!WellDone) return;
UInt32 taddress = tbNetmask.Text.ParseIp();
tbNetmask.Text = taddress.ToIpString();
if (DHCPInterface != null)
@ -236,6 +240,8 @@ namespace EduNetworkBuilder
private void tbIPAddress_Validating(object sender, CancelEventArgs e)
{
if (!WellDone) return;
UInt32 taddress;
Network mynet = NB.GetNetwork();
NB_IPAddress tIPAddress = null;