Exemplo n.º 1
0
 private void B_SendMessage_KeyPress(object sender, KeyPressEventArgs e)
 {
     if (e.KeyChar == (char)Keys.Return)
     {
         B_SendMessage.PerformClick();
     }
 }
Exemplo n.º 2
0
 private void B_SendMessage_KeyPress(object sender, KeyPressEventArgs e)
 {
     if (e.KeyChar == (char)Keys.Return)
     {
         if (connected)
         {
             B_SendMessage.PerformClick();
         }
         else
         {
             MessageBox.Show("Has not detective server to connect...", "Notice", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
         }
     }
 }