public bool createPlaylist(string _title, string _description) { if (!String.IsNullOrEmpty(_title)) { m_newKey = PlaylistManager.createNewPlaylist(_title.Trim(), _description.Trim(), PlaylistManager.PLTypes.Simple); if (!String.IsNullOrEmpty(m_newKey)) { List <Track> currentList = PlaylistManager.currentTrackList; PlaylistManager.currentTrackList = new List <Track>(); var entries = from entry in m_importFile.Entries where entry.Matched select entry; foreach (ImportEntry importEntry in entries) { PlaylistManager.addTrack(m_newKey, importEntry.Key, importEntry.TrackType); } PlaylistManager.currentTrackList = currentList; m_importFile = null; return(true); } } return(false); }
public bool LoadImportFile(string _fileName) { m_importFile = null; if (File.Exists(_fileName)) { progressMessage("Loading file....", true); switch (ImportFormat) { case ImportFormatType.M3U: m_importFile = ImportFileM3U.loadM3UFile(_fileName); break; case ImportFormatType.WPL: m_importFile = ImportFileWPL.loadWPLFile(_fileName); break; //case ImportFormatType.XSPF: // TODO // break; } if (m_importFile != null) { updateSectionLocations(); return(true); } } return(false); }
public string showImport() { m_newKey = ""; m_importFile = null; loadMappedLocations(); OnProgress = null; ImportForm importForm = new ImportForm(); importForm.setImportManager(this); if (importForm.ShowDialog() == System.Windows.Forms.DialogResult.OK) { } saveMappedLocations(); return(m_newKey); }