Ejemplo n.º 1
0
 private void tb_GameName_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Enter && !string.IsNullOrEmpty(this.tb_GameName.Text))
     {
         CreateGameClicked?.Invoke(this, e);
     }
 }
Ejemplo n.º 2
0
 private void btn_CreateGame_Click(object sender, EventArgs e)
 {
     if (!string.IsNullOrEmpty(this.tb_GameName.Text))
     {
         CreateGameClicked?.Invoke(this, e);
     }
     else
     {
         this.tb_GameName.Focus();
         this.tb_GameName.BackColor = Color.LightPink;
     }
 }