Пример #1
0
        private void ProcessData(SocketData data)
        {
            switch (data.Command)
            {
            case (int)SocketCommand.NOTIFY:
                MessageBox.Show(data.Message);
                break;

            case (int)SocketCommand.NEW_GAME:
                //MessageBox.Show(data.Message);
                break;

            case (int)SocketCommand.SEND_POINT:
                this.Invoke((MethodInvoker)(() => {
                    progressBarCoolDown.Value = 0;
                    panelChessBoad.Enabled = true;
                    tmCoolDown.Start();
                    chessBoardManager.OtherPlayerMark(data.Point);
                }));
                break;

            case (int)SocketCommand.UNDO:
                break;

            case (int)SocketCommand.END_GAME:
                break;

            case (int)SocketCommand.QUIT:
                break;

            default:
                break;
            }

            Listern();
        }