private void btnRestart_Click(object sender, EventArgs e) { Form game = new SUDOKU3x3(); try { //if (SUDOKU3x3.active) // game.Dispose(); //else // if (Game4x4.active) // Game4x4.Tat(); //Gửi yêu cầu tạo mảng 3x3 ASCIIEncoding encode = new ASCIIEncoding(); Control1.byteSend = encode.GetBytes("!3"); Control1.stm.Write(Control1.byteSend, 0, Control1.byteSend.Length); Thread.Sleep(500); //Load game 3x3 game = new SUDOKU3x3(); game.Show(); this.Dispose(); } catch { } }
private void button2_Click(object sender, EventArgs e) { ASCIIEncoding encode = new ASCIIEncoding(); Control1.byteSend = encode.GetBytes("3"); Control1.stm.Write(Control1.byteSend, 0, Control1.byteSend.Length); Thread.Sleep(300); Form game = new SUDOKU3x3(); game.Show(); this.Close(); }