Exemple #1
0
 private void richTextBox1_KeyPress(object sender, KeyPressEventArgs e)
 {
     if (e.Equals(Keys.Z))
     {
         Undoer undoer = null;
         foreach (var x in dictionary)
         {
             if (x.Key.Equals(tabFiles.SelectedTab.Controls[1]))
             {
                 undoer = x.Value;
             }
         }
         undoer.UndoWords();
         e.Handled = true;
     }
     if (e.Equals(Keys.Y))
     {
         Undoer undoer = null;
         foreach (var x in dictionary)
         {
             if (x.Key.Equals(tabFiles.SelectedTab.Controls[1]))
             {
                 undoer = x.Value;
             }
         }
         undoer.RedoWords();
         e.Handled = true;
     }
 }
 private void tbAndar_KeyPress(object sender, KeyPressEventArgs e)
 {
     if ((!char.IsNumber(e.KeyChar) && !(e.KeyChar == 8)) || (e.Equals(Keys.Control)))
     {
         e.Handled = true;
     }
 }
Exemple #3
0
        private void txtbSearch_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (e.Equals("{ENTER}"))
            {
                listBox1.Items.Clear();

                foreach (userMessages mess in goog.allMessages.Values)
                {
                    if (mess.TITLE.Contains(txtbSearch.Text))
                    {
                        listBox1.Items.Add(mess);
                    }
                }
            }
        }
        private void tbValor_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (tbValor.Text.Contains(","))
            {
                if ((!char.IsNumber(e.KeyChar) && !(e.KeyChar == 8)) || (e.Equals(Keys.Control)))
                {
                    e.Handled = true;
                }
            }

            if ((!char.IsNumber(e.KeyChar) && !(e.KeyChar == ',') && !(e.KeyChar == 8)) || (e.Equals(Keys.Control)))
            {
                e.Handled = true;
            }
        }