Пример #1
0
        private void PopulateStars(double mos, Grid[] stars)
        {
            for (int starIndex = 0; starIndex < stars.Count(); starIndex++)
            {
                double starValue = mos - starIndex;

                if (starValue > 0.9) ChangeGridBackground(stars[starIndex], "/Assets/Icons/Star1.0.png");
                else if (starValue > 0.8) ChangeGridBackground(stars[starIndex], "/Assets/Icons/Star0.9.png");
                else if (starValue > 0.7) ChangeGridBackground(stars[starIndex], "/Assets/Icons/Star0.8.png");
                else if (starValue > 0.6) ChangeGridBackground(stars[starIndex], "/Assets/Icons/Star0.7.png");
                else if (starValue > 0.5) ChangeGridBackground(stars[starIndex], "/Assets/Icons/Star0.6.png");
                else if (starValue > 0.4) ChangeGridBackground(stars[starIndex], "/Assets/Icons/Star0.5.png");
                else if (starValue > 0.3) ChangeGridBackground(stars[starIndex], "/Assets/Icons/Star0.4.png");
                else if (starValue > 0.2) ChangeGridBackground(stars[starIndex], "/Assets/Icons/Star0.3.png");
                else if (starValue > 0.1) ChangeGridBackground(stars[starIndex], "/Assets/Icons/Star0.2.png");
                else if (starValue > 0.0) ChangeGridBackground(stars[starIndex], "/Assets/Icons/Star0.1.png");
                else ChangeGridBackground(stars[starIndex], "/Assets/Icons/Star0.0.png");   
            }
        }