예제 #1
0
        public void StartNextRound()
        {
            int  seconds;
            bool timeIsPerPlayer = Convert.ToBoolean(settings[Settings.Default.IniSection]["TimeIsPerPlayer"]);
            int  secondsPerRound = Int32.Parse(settings[Settings.Default.IniSection]["SecondsPerRound"]);
            //int secondsPerPlayer = Int32.Parse(settings[Settings.Default.IniSection]["SecondsPerPlayer"]);
            //int maxSecondsPerRound = Int32.Parse(settings[Settings.Default.IniSection]["MaxSecondsPerRound"]);
            int lastRebuyRound = Int32.Parse(settings[Settings.Default.IniSection]["LastRebuyRound"]);

            //if (timeIsPerPlayer)
            //{
            //    seconds = secondsPerPlayer;
            //}
            //else
            //{
            //    seconds = secondsPerRound;
            //}

            currentGameData.NextRound();
            currentGameData.ResetTime();

            if (currentGameData.Round == lastRebuyRound)
            {
                lblNoRebuys.Visible = true;
                lblNoRebuys.Text    = "No rebuys after this round!";
                Fonts.ResizeFont(lblNoRebuys);
            }
            else if (currentGameData.Round > lastRebuyRound)
            {
                lblNoRebuys.Visible = true;
                lblNoRebuys.Text    = "No rebuys!!!!";
                Fonts.ResizeFont(lblNoRebuys);
            }

            lblRound.Text      = "Round " + currentGameData.Round;
            lblBlinds.Text     = currentGameData.GetBlinds();
            lblNextBlinds.Text = currentGameData.GetNextBlinds();

            lblTime.ForeColor = Color.White;

            lblTime.Text          = currentGameData.GetMinutes().ToString("D2") + ":" + currentGameData.GetSeconds().ToString("D2");
            tmrPokerTimer.Enabled = true;

            //Reset sound counter
            timerAtZeroCount = 0;

            currentGameData.State = State.TimeRunning;
            btnStart.Text         = "Pause";

            fonts.ResizeAllFonts();
        }
예제 #2
0
 public void UpdateDataControls(CurrentGameData currentGameData)
 {
     lblPlayersLeftVal.Text = currentGameData.PlayersLeft.ToString();
     lblTotalChipsVal.Text  = currentGameData.TotalChips.ToString();
     lblAvgStackVal.Text    = currentGameData.AverageStack.ToString();
     lblTime.Text           = currentGameData.GetMinutes().ToString("D2") + ":" + currentGameData.GetSeconds().ToString("D2");
     lblRound.Text          = "Round " + currentGameData.Round;
     lblBlinds.Text         = currentGameData.GetBlinds();
     lblNextBlinds.Text     = currentGameData.GetNextBlinds();
     lblPotVal.Text         = "$" + currentGameData.Pot;
     lblFirstVal.Text       = "$" + currentGameData.GetPayouts()[0];
     lblSecondVal.Text      = "$" + currentGameData.GetPayouts()[1];
     lblThirdVal.Text       = "$" + currentGameData.GetPayouts()[2];
     lblFourthVal.Text      = "$" + currentGameData.GetPayouts()[3];
 }