private void widthValidation(object sender, CancelEventArgs e) { if ((width.Value < Desk.MINWIDTH || width.Value > Desk.MAXWIDTH) && !(Char.IsDigit((char)width.Value))) { width.Text = String.Empty; invalid f = new invalid(); f.Show(this); } }
private void drawerValidation(object sender, EventArgs e) { if (drawer.Value > Desk.MAXDRAWERS) { drawer.Text = String.Empty; invalid f = new invalid(); f.Show(this); } }
private void depthValidation(object sender, EventArgs e) { if (depth.Value < Desk.MINDEPTH || depth.Value > Desk.MAXDEPTH) { depth.Text = String.Empty; invalid f = new invalid(); f.Show(this); } }