public static List <string> GetGenreRateBySongsNumber(int max = 0, int min = 0) { List <string> genre = new List <string>(); Dictionary <string, int> keyValuePairs = GetDataFromGoogleSheet.GetNumberOfSongContainGenre(); if (max == 0) { } foreach (KeyValuePair <string, int> entry in keyValuePairs) { if (max == 0) { if (entry.Value >= min) { genre.Add(entry.Key); } } else if (min == 0) { if (entry.Value < max) { genre.Add(entry.Key); } } else { if (entry.Value < max && entry.Value >= min) { genre.Add(entry.Key); } } } return(genre); }
static void Main() { Application.SetHighDpiMode(HighDpiMode.SystemAware); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); GetDataFromGoogleSheet.GetSongFromGoogleSheet(); Application.Run(new Form1()); }