Exemple #1
0
        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;
        }
Exemple #2
0
 private void MainForm_FormClosed(object sender, FormClosedEventArgs e)
 {
     Properties.Settings.Default.CacheKeyToFilenameMap = ResponseCache.Serialize();
     Properties.Settings.Default.Save();
 }