private void showPlaylistEditor()
 {
     if (m_playlistEditor == null)
         m_playlistEditor = new FPlaylistEditor();
     m_playlistEditor.ShowDialog();
     String playlistPath = CListFileUtil.GetBasePathFromRegistry();;
     if (playlistPath.Contains("\\bin\\Debug") || playlistPath.Contains("\\bin\\Release"))
     {
         playlistPath = playlistPath.Replace("\\bin\\Debug", "");
         playlistPath = playlistPath.Replace("\\bin\\Release", "");
     }
     playlistPath += "\\Playlists\\";
     String[] files = Directory.GetFiles(playlistPath, "*.playlist");
     lbxPlaylistSelect.Items.Clear();
     foreach (String file in files)
     {
         CPlaylist list = new CPlaylist();
         list.Load(file);
         lbxPlaylistSelect.Items.Add(list);
     }
 }
 private void FPlaylistEditor_VisibleChanged(object sender, EventArgs e)
 {
     if (!Visible)
         return;
     String startPath = CListFileUtil.GetBasePathFromRegistry();
     startPath += "\\Audio";
     tbxFolder.Text = startPath;
     String playlistPath = CListFileUtil.GetBasePathFromRegistry();;
     playlistPath += "\\Playlists\\";
     String[] files = Directory.GetFiles(playlistPath, "*.playlist");
     cbxPlaylistSelect.Items.Clear();
     foreach (String file in files)
     {
         CPlaylist list = new CPlaylist();
         list.Load(file);
         cbxPlaylistSelect.Items.Add(list);
     }
     if (cbxPlaylistSelect.Items.Count > 0)
         cbxPlaylistSelect.SelectedIndex = 0;
 }
 private void loadPlaylists()
 {
     String basePath = CListFileUtil.GetBasePathFromRegistry();
     String[] files = Directory.GetFiles(basePath + "\\Playlists", "*.playlist");
     lbxPlaylistSelect.Items.Clear();
     foreach (String file in files)
     {
         CPlaylist list = new CPlaylist();
         list.Load(file);
         if(CListFileUtil.RemapPlaylistBasePath(ref list, basePath))
             list.Save();
         lbxPlaylistSelect.Items.Add(list);
     }
     files = Directory.GetFiles(basePath + "\\Playlists", "*.roundlist");
     lbxRoundSelect.Items.Clear();
     foreach (String file in files)
     {
         CPlaylist list = new CPlaylist();
         list.Load(file);
         if (CListFileUtil.RemapPlaylistBasePath(ref list, basePath))
             list.Save();
         lbxRoundSelect.Items.Add(list);
     }
     files = Directory.GetFiles(basePath + "\\Playlists", "*.ranklist");
     lbxRankSelect.Items.Clear();
     foreach (String file in files)
     {
         CPlaylist list = new CPlaylist();
         list.Load(file);
         if (CListFileUtil.RemapPlaylistBasePath(ref list, basePath))
             list.Save();
         lbxRankSelect.Items.Add(list);
     }
 }