public AAPList(M3UEntry entry, int count) { path = Path.GetDirectoryName(entry.Path.LocalPath); filename = Path.GetFileName(entry.Path.LocalPath); title = entry.Title; length = (int)entry.Duration.TotalSeconds; order = count; }
public AAPList(M3UEntry entry,int count) { path = Path.GetDirectoryName(entry.Path.LocalPath); filename = Path.GetFileName(entry.Path.LocalPath); title = entry.Title; length = (int)entry.Duration.TotalSeconds; order = count; }
private void PLSaveList_Click(object sender, RoutedEventArgs e) { M3UFile _m3uFile = new M3UFile(); foreach (AAPList entry in AAPLists) { M3UEntry line = new M3UEntry(entry.lengthAsTimeSpan, entry.displayName, entry.pathAsURI); _m3uFile.Add(line); } if (_m3uFile != null) { using (var sfd = new SaveFileDialog() { Filter = "M3U File (*.m3u)|*.m3u", Title = "Save Playlist" }) { if (sfd.ShowDialog() == System.Windows.Forms.DialogResult.OK) { _m3uFile.Save(sfd.FileName); } } } }