예제 #1
0
 private void buttonSelectImages_Click(object sender, EventArgs e)
 {
     if (radioButtonAll.Checked) // All
     {
         RebuildImageSelector_CheckRandomizer(WallpaperData.GetAllImages());
     }
     else if (radioButtonUnranked.Checked) // Unranked
     {
         RebuildImageSelector_CheckRandomizer(WallpaperData.GetImagesOfRank(0));
     }
     else if (radioButtonRanked.Checked) // Ranked
     {
         RebuildImageSelector_CheckRandomizer(WallpaperData.GetAllRankedImages());
     }
 }
예제 #2
0
        public RankDistributionChart()
        {
            InitializeComponent();

            int maxRank = WallpaperData.GetMaxRank();

            // Adds each rank's image count to the graph
            SuspendLayout();
            chartRankDistribution.ChartAreas[0].AxisX.Interval = maxRank / 20;
            chartRankDistribution.ChartAreas[0].AxisX.Maximum  = maxRank + 0.5; // this offsets the graph's visuals otherwise only half of the last bar would appear
            for (int i = 1; i <= maxRank; i++)
            {
                chartRankDistribution.Series[0].Points.Add(new DataPoint(i, WallpaperData.GetImagesOfRank(i).Length));
            }

            labelImageCount.Text = "Ranked Images: " + WallpaperData.GetAllRankedImages().Length + " | Unranked Images: " + (WallpaperData.GetAllImageData().Length - WallpaperData.GetAllRankedImages().Length);
            ResumeLayout();
        }