public void SetGameStart(HandleGamePacket gamePacketParam)
        {
            StrMyBetting          = "";
            StrOtherPlayerBetting = "";

            IsExitGame = false; //나가기 버튼 이벤트 발생 후, 다른 매칭상대와 게임을 시작 할경우 초기화
            IsPlayGame = true;  //나가기 버튼 비활성화

            if (newGameStart != null)
            {
                newGameStart.Join();
                newGameStart = null;
            }

            this.myIndex           = gamePacketParam.MyIndex;
            this.myTurn            = gamePacketParam.playerTurn;
            this.myCard            = gamePacketParam.MyCard;
            this.otherPlayerCard   = gamePacketParam.OtherPlayerCard;
            this.myMoney           = gamePacketParam.MyMoney;
            this.otherPlayerMoney  = gamePacketParam.OtherPlayerMoney;
            this.totalBettingMoney = gamePacketParam.TotalBettingMoney;

            Dispatcher.BeginInvoke(new Action(() =>
            {
                //Button_MyCard.Content = this.myCard.ToString();
                Button_OtherPlayerCard.Content = this.otherPlayerCard.ToString();

                Label_MyMoney.Content          = this.myMoney.ToString();
                Label_OtherPlayerMoney.Content = this.otherPlayerMoney.ToString();

                Label_BetTotalMoney.Content = this.totalBettingMoney.ToString();

                if (myTurn == 1)
                {
                    TextBox_UserLog.AppendText("게임이 시작되었습니다. 선턴입니다. 베팅 하세여 \n");
                    isFirstTurn = true;
                    SetButtonsEnable(isFirstTurn);
                }
                else
                {
                    TextBox_UserLog.AppendText("게임이 시작되었습니다. 후턴입니다. \n");
                    SetButtonsDisable();
                }
                Button_MyCard.Content = "뒷면";
            }));
        }
        private void PrintBetting(Betting bettingParam)
        {
            Dispatcher.BeginInvoke(new Action(() =>
            {
                switch (bettingParam)
                {
                case Betting.BettingCall:
                    TextBox_UserLog.AppendText("상대방이 콜 베팅했습니다. \n");
                    StrOtherPlayerBetting = "콜";
                    break;

                case Betting.BettingCheck:
                    TextBox_UserLog.AppendText("상대방이 체크 베팅했습니다. \n");
                    StrOtherPlayerBetting = "체크";
                    break;

                case Betting.BettingDie:
                    TextBox_UserLog.AppendText("상대방이 다이 베팅했습니다. \n");
                    StrOtherPlayerBetting = "다이";
                    break;

                case Betting.BettingDouble:
                    TextBox_UserLog.AppendText("상대방이 따당 베팅했습니다. \n");
                    StrOtherPlayerBetting = "따당";
                    break;

                case Betting.BettingQueter:
                    TextBox_UserLog.AppendText("상대방이 쿼터 베팅했습니다. \n");
                    StrOtherPlayerBetting = "쿼터";
                    break;

                case Betting.BettingHalf:
                    TextBox_UserLog.AppendText("상대방이 하프 베팅했습니다. \n");
                    StrOtherPlayerBetting = "하프";
                    break;
                }

                if (bettingParam == Betting.BettingCheck || bettingParam == Betting.BettingDouble ||
                    bettingParam == Betting.BettingQueter || bettingParam == Betting.BettingHalf)
                {
                    SetButtonsEnable(false);
                }
            }));
        }
        public void ReceiveBetting(Betting betting, IndianPokerGamePacket gamePacketParam)
        {
            if (gamePacketParam.playerTurn == myTurn)
            {
                PrintBetting(betting);
            }

            this.otherPlayerMoney        = gamePacketParam.MyMoney;
            this.otherPlayerBettingMoney = gamePacketParam.BettingMoney;
            this.totalBettingMoney       = totalBettingMoney + gamePacketParam.BettingMoney;

            Dispatcher.BeginInvoke(new Action(() =>
            {
                Label_OtherPlayerMoney.Content = this.otherPlayerMoney.ToString();
                Label_BetTotalMoney.Content    = totalBettingMoney.ToString();
            }));

            if (gamePacketParam.Betting == (short)Betting.BettingCall)
            {
                if (gamePacketParam.VictoryUser == myIndex)
                {
                    myMoney = myMoney + totalBettingMoney;

                    Dispatcher.BeginInvoke(new Action(() =>
                    {
                        TextBox_UserLog.AppendText("게임에서 이겼습니다. \n");
                        TextBox_UserLog.AppendText("새로운 게임을 시작하겠습니다. 준비하세요.\n");
                        Button_MyCard.Content = this.myCard.ToString();
                    }));
                }
                else
                {
                    Dispatcher.BeginInvoke(new Action(() =>
                    {
                        TextBox_UserLog.AppendText("게임에서 졌습니다. \n");
                        TextBox_UserLog.AppendText("새로운 게임을 시작하겠습니다. 준비하세요.\n");
                        Button_MyCard.Content = this.myCard.ToString();
                    }));
                }
                newGameStart = new Thread(new ThreadStart(SendNewGameThread));
                newGameStart.Start();
            }

            else if (gamePacketParam.Betting == (short)Betting.BettingDie)
            {
                myMoney = myMoney + totalBettingMoney;

                if (gamePacketParam.VictoryUser == myIndex)
                {
                    Dispatcher.BeginInvoke(new Action(() =>
                    {
                        TextBox_UserLog.AppendText("상대방이 베팅을 포기하여 게임에서 이겼습니다. \n");
                        TextBox_UserLog.AppendText("새로운 게임을 시작하겠습니다. 준비하세요.\n");
                        Label_MyMoney.Content = myMoney.ToString();
                    }));
                }
                else if (gamePacketParam.VictoryUser != myIndex)
                {
                    Dispatcher.BeginInvoke(new Action(() =>
                    {
                        TextBox_UserLog.AppendText("게임에서 졌습니다. \n");
                        TextBox_UserLog.AppendText("새로운 게임을 시작하겠습니다. 준비하세요.\n");
                    }));
                }
                newGameStart = new Thread(new ThreadStart(SendNewGameThread));
                newGameStart.Start();
            }

            else
            {
                StrMyBetting = string.Empty;
            }
        }