public static decimal ShowBox(decimal oldNumber, decimal minNumber, decimal maxNumber) { KeyBoard keyBoard = new KeyBoard(); keyBoard.OldNumber = oldNumber; keyBoard.MinNumber = minNumber; keyBoard.MaxNumber = maxNumber; keyBoard.ShowDialog(); return(keyBoard.Result); }
private void upDownLength_GotFocus(object sender, EventArgs e) { this.Focus(); upDownLength.Value = KeyBoard.ShowBox(upDownLength.Value, upDownLength.Minimum, upDownLength.Maximum); }
private void upDownAccleration_GotFocus(object sender, EventArgs e) { this.Focus(); upDownAcceleration.Value = KeyBoard.ShowBox(upDownAcceleration.Value, upDownAcceleration.Minimum, upDownAcceleration.Maximum); }