public MainWindow(int m_type) { InitializeComponent(); ChessBoardMain.m_TypePlay = m_type; ChatMain.m_TypePlay = m_type; ChessBoardMain.m_NameHuman = ChatMain.m_NameHuman; m_TypePlay = m_type; if (StartGame != null) { StartGame(m_TypePlay); } ChatMain.ChatWeCome(m_TypePlay); ChessBoardMain.message_changed += OnShowMessage; // Sự kiện Nhận nt online ChatMain.ChangeName_changed += OnChangeName; // Sự kiện thay đổi tên ChatMain.SenMessageSever_changed += OnSentMessage; // sự kiện gởi tn online ChessBoardMain.Exit_changed += OnExitGame; // Thoát khi kết thúc màn chơi FrmPause.exitGame += OnExitGame; // sự kiện thoát game FrmPause.newGame += OnNewGame; // sự kiện new game }