private void button2_Click(object sender, EventArgs e) { if (textBox1.Text != "") { client.Player = new PlayerInfo(textBox1.Text, 0, 0); try { client.Connect(); client.Login(textBox1.Text); } catch { MessageBox.Show("서버 접속에 실패했습니다!"); } } }
private void Btn_regame_Click(object sender, EventArgs e) { iHaveToQuit = true; this.Close(); client.gameForm.Close(); string oldNickname = client.Player.Nickname; client.Player = new PlayerInfo(oldNickname, 0, 0); client.Connect(); client.Login(oldNickname); }