예제 #1
0
파일: MainForm.cs 프로젝트: onsubmit/sTunes
        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;
        }
예제 #2
0
파일: MainForm.cs 프로젝트: onsubmit/sTunes
 private void MainForm_FormClosed(object sender, FormClosedEventArgs e)
 {
     Properties.Settings.Default.CacheKeyToFilenameMap = ResponseCache.Serialize();
     Properties.Settings.Default.Save();
 }