public static void startNumberKeyboard(StartNumberDelegate func) { NumberKeyboard nk = new NumberKeyboard(); if (nk.ShowDialog() == DialogResult.OK) { func(nk.Number); } }
private void numPadButton2_Click(object sender, EventArgs e) { NumberKeyboard nk = new NumberKeyboard(); if (nk.ShowDialog() == DialogResult.OK) { upDownAcceleration.Value = (decimal)nk.Number; } }
private void button1_Click(object sender, EventArgs e) { NumberKeyboard nk = new NumberKeyboard(); if (nk.ShowDialog() == DialogResult.OK) { this.upDownTurnAngle.Value = (int)nk.Number; } }
private void button_NumberKeyPad_Click(object sender, EventArgs e) { NumberKeyboard nk = new NumberKeyboard(); if (nk.ShowDialog() == DialogResult.OK) { this.npAngle.Value = (decimal)nk.Number; } }
private void upDownSpeed_GotFocus(object sender, EventArgs e) { this.Focus(); NumberKeyboard nk = new NumberKeyboard(); if (nk.ShowDialog() == DialogResult.OK) { } }
private void buttonSpeed_Click(object sender, EventArgs e) { NumberKeyboard nk = new NumberKeyboard(); if (nk.ShowDialog() == DialogResult.OK) { upDownSpeed.Value = (int)nk.Number; } }
private void buttonEditLength_Click(object sender, EventArgs e) { NumberKeyboard nk = new NumberKeyboard(); nk.Number = (float)upDownLength.Value; if (nk.ShowDialog() == DialogResult.OK) { upDownLength.Value = (int)nk.Number; } }
// ... Button private void button2_Click(object sender, EventArgs e) { NumberKeyboard numberkeyboard = new NumberKeyboard(); numberkeyboard.Number = (float)numericUpDown1.Value; if (numberkeyboard.ShowDialog() == DialogResult.OK) { numericUpDown1.Value = (decimal)numberkeyboard.Number; } }
// Winkel eingeben (angle_updown.Value) private void button3_Click(object sender, EventArgs e) { NumberKeyboard numberkeyboard = new NumberKeyboard(); numberkeyboard.Number = (float)angle_updown.Value; if (numberkeyboard.ShowDialog() == DialogResult.OK) { angle_updown.Value = (decimal)numberkeyboard.Number; } }
private void numPadButton1_Click(object sender, EventArgs e) { NumberKeyboard.startNumberKeyboard((float number) => { try { upDownArcRadius.Value = (decimal)number; } catch (ArgumentOutOfRangeException ex) { //TODO } }); }
private void button1_Click(object sender, EventArgs e) { NumberKeyboard nk = new NumberKeyboard(); if (nk.ShowDialog() == DialogResult.OK) { if ((decimal)nk.Number <= this.upDownLineLength.Maximum) { this.upDownLineLength.Value = (decimal)nk.Number; } else { this.upDownLineLength.Value = this.upDownLineLength.Maximum; } } }
private void button2_Click(object sender, EventArgs e) { NumberKeyboard nk = new NumberKeyboard(); if (nk.ShowDialog() == DialogResult.OK) { //MAX Abfrage... if ((decimal)nk.Number <= this.upDownArcAngle.Maximum) { this.upDownArcAngle.Value = (decimal)nk.Number; } else { this.upDownArcAngle.Value = this.upDownArcAngle.Maximum; } } }
private void button1_Click(object sender, EventArgs e) { NumberKeyboard nk = new NumberKeyboard(); if (nk.ShowDialog() == DialogResult.OK) { //max abfrage if ((decimal)nk.Number <= this.upDownArcRadius.Maximum) { this.upDownArcRadius.Value = (decimal)nk.Number; } //sonst max value setzen else { this.upDownArcRadius.Value = this.upDownArcRadius.Maximum; } } }