Пример #1
0
        public Form1()
        {
            InitializeComponent();

            caroChess = new CaroChess();
            caroChess.CreateChessPieces();
            grs = pnlChessBoard.CreateGraphics();

            socket               = new SocketManager();
            prcbCoolDown.Step    = cdStep;
            prcbCoolDown.Maximum = cdTime;
            prcbCoolDown.Value   = 0;

            tmCoolDown.Interval = cdInterval;

            lbNamePlayer.Text = "";
            backgroundMusic   = new System.Media.SoundPlayer(Game_Caro.Properties.Resources.nhacnen);
            gameOver          = new SoundPlayer(Game_Caro.Properties.Resources.GameOver3);
            click             = new System.Media.SoundPlayer(Game_Caro.Properties.Resources.Bell1);
            click1            = new System.Media.SoundPlayer(Game_Caro.Properties.Resources.click1);
            getReady          = new System.Media.SoundPlayer(Game_Caro.Properties.Resources.GetReady5);
            Win = new System.Media.SoundPlayer(Game_Caro.Properties.Resources.win);
            backgroundMusic.PlayLooping();
        }
Пример #2
0
        private void GameCaro_Load(object sender, EventArgs e)
        {
            board = new BoardChessManager(PanelBoardChess);

            socket = new SocketManager();
        }