public Form1() { InitializeComponent(); BanCo = new XuLyBanCo(pnlChessBoard, txbPlayerName, pctbMark); BanCo.VeBanCo(); NhacNen.Play(); }
public Form1() { InitializeComponent(); Control.CheckForIllegalCrossThreadCalls = false; BanCo = new XuLyBanCo(pnlChessBoard, txbPlayerName, pctbMark); BanCo.EndedGame += ChessBoard_Endedgame; BanCo.PlayerMarked += ChessBoard_PlayerMarked; //Thêm sự kiện cho pannel và thược tính cho timer pcbCoolDown.Step = Cons.COOL_DOWN_STEP; pcbCoolDown.Maximum = Cons.COOL_DOWN_TIME; pcbCoolDown.Value = 0; //giá trị ban đầu tmCoolDown.Interval = Cons.COOL_DOWN_INTERVAL; socket = new SocketManager(); NewGame(); }