Exemple #1
0
        /// <summary>
        /// Updates the total player picks and total value based on the selected prize levels
        /// </summary>
        public void updateInfo()
        {
            if (Prizes.getNumPrizeLevels() > 0)
            {
                DivModel.clearPrizeLevelList();
                for (int i = 0; i < Prizes.getNumPrizeLevels(); i++)
                {
                    if (DivModel.levelBoxes[i].IsSelected)
                    {
                        DivModel.addPrizeLevel(Prizes.getPrizeLevel(i));
                    }
                }

                DivModel.TotalPlayerPicks = DivModel.calculateTotalCollections();
                DivModel.TotalPrizeValue  = DivModel.calculateDivisionValue();
            }

            SectionContainer.validateDivision();
        }
Exemple #2
0
        /// <summary>
        /// Updates all of the info and prize level box data in the division
        /// </summary>
        public void updateDivision()
        {
            if (Prizes.getNumPrizeLevels() > 0)
            {
                for (int i = 0; i < DivisionModel.MAX_PRIZE_BOXES; i++)
                {
                    if (DivModel.levelBoxes[i].IsAvailable && DivModel.levelBoxes[i].IsSelected)
                    {
                        DivModel.addPrizeLevel(Prizes.getPrizeLevel(i));
                    }
                    else
                    {
                        DivModel.levelBoxes[i].IsSelected = false;
                    }
                }

                DivModel.TotalPlayerPicks = DivModel.calculateTotalCollections();
                DivModel.TotalPrizeValue  = DivModel.calculateDivisionValue();
            }
        }