public void Say(string text, int time = -1) { cloud.Visible = true; cloudText.Text = text; cloudText.Visible = true; if (time > -1) { Gaming.wait(time); cloud.Visible = false; cloudText.Visible = false; } }
private void Button1_Click(object sender, EventArgs e) { if (NameInput.Text.Trim() == "") { errorMessage.Visible = true; } else { Hide(); string username = NameInput.Text; int num = Convert.ToInt32(numericUpDown1.Value); Gaming form2 = new Gaming(username, num); form2.Closed += (object s, EventArgs args) => Close(); form2.Show(); } }