Esempio n. 1
0
        public CaroWithYourFrends()
        {
            InitializeComponent();
            Control.CheckForIllegalCrossThreadCalls = false;
            ChessBoard = new ChessBoardManager(pnlChessBoard, txtNamePlayer, picMarkPlayer, undoToolStripMenuItem);
            ChessBoard.PlayerMarked += ChessBoard_PlayerMarked;

            newGame();
            socket = new SocketManager();
        }
Esempio n. 2
0
        public Form1()
        {
            Control.CheckForIllegalCrossThreadCalls = false;
            socket = new SocketManager();
            InitializeComponent();
            chessboard                    = new ChessBoardManager(pnl_chessboard, ptbMark, tbxName);
            chessboard.EndedGame         += Chessboard_EndedGame;
            chessboard.PlayerMark        += Chessboard_PlayerMark;
            ptbMark.BackgroundImageLayout = ImageLayout.Stretch;
            NewGame();

            pgbCoolDown.Step    = Const.COOL_DOWN_STEP;
            pgbCoolDown.Maximum = Const.COOL_DOWN_TIME;
            pgbCoolDown.Minimum = 0;

            tmCoolDown.Interval = Const.COOL_DOWN_INTERVAL;
        }
Esempio n. 3
0
 public Form1()
 {
     CheckForIllegalCrossThreadCalls = false;
     InitializeComponent();
     this.StartPosition = FormStartPosition.CenterScreen;
     chessBoardManager  = new ChessBoardManager()
     {
         PnlChessBoard = pnlChessboard,
         LbTurn        = lbTurn,
         RtbChatArea   = rtbChatArea,
         txtPlayerName = txtPlayerName,
         TxtEnemyName  = txtEnemyName
     };
     socket = new SocketManager();
     chessBoardManager.PlayerMarkEvent += ChessBoard_PlayerMarkEvent;
     chessBoardManager.EndGameEvent    += ChessBoard_EndGameEvent;
     chessBoardManager.DrawChessBoard();
 }
Esempio n. 4
0
        public Form1()
        {
            InitializeComponent();

            Control.CheckForIllegalCrossThreadCalls = false;

            ChessBoard               = new ChessBoardManager(pnlChessBoard, txbPlayerName, pctbMark);
            ChessBoard.EndedGame    += ChessBoard_EndedGame;
            ChessBoard.PlayerMarked += ChessBoard_PlayerMarked;


            pcbCircular.Step    = Constant.COOL_DOWN_STEP;
            pcbCircular.Maximum = Constant.COOL_DOWN_TIME;
            pcbCircular.Value   = 0;

            tmCoolDown.Interval = Constant.COOL_DOWN_INTERVAL;

            socket = new KetNoiMang();

            NewGame();
        }