private async void MainForm_Load(object sender, EventArgs e) { if (!string.IsNullOrWhiteSpace(Properties.Settings.Default.CacheKeyToFilenameMap)) { ResponseCache.Deserialize(Properties.Settings.Default.CacheKeyToFilenameMap); } Dictionary <string, Playlist> playlists = await this.RunAsync(this.GetMyPlaylists()); foreach (KeyValuePair <string, Playlist> playlist in playlists) { int rowId = this.dataGridViewPlaylists.Rows.Add(); DataGridViewRow row = this.dataGridViewPlaylists.Rows[rowId]; row.Tag = playlist.Value; row.Cells["Playlist"].Value = playlist.Value.Name; } this.dataGridViewPlaylists.CurrentCell = null; }
private void MainForm_FormClosed(object sender, FormClosedEventArgs e) { Properties.Settings.Default.CacheKeyToFilenameMap = ResponseCache.Serialize(); Properties.Settings.Default.Save(); }