Exemplo n.º 1
0
        private void txtSenha_KeyPress(object sender, KeyPressEventArgs e)
        {
            String conversao = "";

            conversao += e.ToString();
            e.ToString().Replace("s", "*");
        }
Exemplo n.º 2
0
 private void txtCelular_KeyPress(object sender, KeyPressEventArgs e)
 {
     if (e.KeyChar != 8)
     {
         if (char.IsNumber(e.KeyChar))
         {
             e.Handled = false;
             if (txtCelular.Text.Length == 0)
             {
                 txtCelular.Text           = "(";
                 txtCelular.SelectionStart = txtCelular.Text.Length;
             }
             if (txtCelular.Text.Length == 3 && e.ToString() != "Back")
             {
                 txtCelular.Text           = txtCelular.Text + ")";
                 txtCelular.SelectionStart = txtCelular.Text.Length;
             }
             if (txtCelular.Text.Length == 8 && e.ToString() != "Back")
             {
                 txtCelular.Text           = txtCelular.Text + "-";
                 txtCelular.SelectionStart = txtCelular.Text.Length;
             }
         }
         else
         {
             e.Handled = true;
         }
     }
 }
Exemplo n.º 3
0
 private void PasswordKeyPressed(object sender, KeyPressEventArgs e)
 {
     if (e.ToString() == Keys.Enter.ToString())
     {
         bt_Connect_Click(sender, e);
     }
 }
Exemplo n.º 4
0
 private void frmGameplay_KeyPress(object sender, KeyPressEventArgs e)
 {
     if ((e.ToString() == "F1"))
     {
         this.help();
     }
 }
Exemplo n.º 5
0
 private void MainScreen_KeyPress(object sender, KeyPressEventArgs e)
 {
     if (e.KeyChar == (char)Keys.Enter)
     {
         MessageBox.Show(e.ToString());
     }
 }
Exemplo n.º 6
0
 private void result_KeyPress(object sender, KeyPressEventArgs e)
 {
     if (e.ToString() == Keys.Escape.ToString())
     {
         this.Close();
     }
 }
 /*Caja de Ingreso*/
 private void ingresVal1_TextChanged(object sender, KeyPressEventArgs e)
 {
     if (e.KeyChar >= 40 && e.KeyChar <= 57)
     {
         e.Handled = false;
         val1      = e.ToString();
     }
     else
     {
         e.Handled = true;
     }
 }
Exemplo n.º 8
0
 private void txtQty_KeyPress(object sender, KeyPressEventArgs e)
 {
     if (e.KeyChar == (char)13 && e.ToString().Length > 0)
     {
         string    strdate_f = date_F.DateTime.ToString("yyyyMMdd"), strdate_t = date_T.DateTime.ToString("yyyyMMdd");
         DataTable dt = SEL_DATA_ANDON("T", strdate_f, strdate_t, sLine, "", "", "", "", txtQty.Text);
         if (dt != null && dt.Rows.Count > 0)
         {
             lblTarget.Text = dt.Rows[0][0].ToString();
         }
     }
     if (!char.IsControl(e.KeyChar) && !char.IsDigit(e.KeyChar) && (e.KeyChar != '.'))
     {
         e.Handled = true;
     }
 }
Exemplo n.º 9
0
 private void dgBusqueda_KeyPress(object sender, KeyPressEventArgs e)
 {
     try
     {
         if (e.KeyChar == Convert.ToChar(Keys.Enter))
         {
             AccionOptativa();
         }
     }
     catch (Exception ex)
     {
         Cursor.Current = Cursors.Default;
         ManejarError Err = new ManejarError();
         Err.CargarError(ex,
                         e.ToString(),
                         ((Control)sender).Name,
                         this.FindForm().Name);
     }
 }
Exemplo n.º 10
0
 private void MazeForm_KeyPress(object sender, KeyPressEventArgs e)
 {
     e.Handled = true;
     MessageBox.Show(e.ToString());
 }
Exemplo n.º 11
0
 public void MyKeyPressEventHandler(Object sender, KeyPressEventArgs e)
 {
     Debug.WriteLine("Press " + e.ToString());
 }