Ejemplo n.º 1
0
 private void numericUpDown1_KeyPress(object sender, KeyPressEventArgs e)
 {
     if (e.KeyChar == (char)Keys.Return)
     {
         var numericUpDown = sender as NumericUpDown;
         if (numericUpDown != null)
         {
             _jsr.SetSpeedLimit(Convert.ToInt32(string.IsNullOrEmpty(numericUpDown.Text) ? "0" : numericUpDown.Text));
         }
     }
 }