private void RenameDia_OnFinished(object sender, EventArgs e) { RenameDialogControl renameDialog = (RenameDialogControl)sender; PlaylistModel playlistModel = renameDialog.PlaylistModel; if (renameDialog.IsCancel) { return; } string PlaylistName = renameDialog.RenameText.Text; if (playlistModel == null) { PlaylistModel plm = new PlaylistModel { PlaylistName = PlaylistName }; plm.Add(renameDialog.ItemPath); AddToPlayList(plm); return; } playlistModel.PlaylistName = PlaylistName; AddToPlayList(playlistModel); }
public void UpdateList() { if (currentplaylist == null) { return; } currentplaylist.Clear(); foreach (var item in PlayListCollection) { currentplaylist.Add(item.Directory.FullName); } HasChanges = false; }
public PlaylistModel NewCreatePlaylist() { PlaylistModel ipl = new PlaylistModel { PlaylistName = this.TempPlaylistName }; foreach (var item in PlayListCollection) { ipl.Add(item.Directory.FullName); } TempPlaylistName = null; return(ipl as PlaylistModel); }
private void NewPlaylist_executed(object sender, ExecutedRoutedEventArgs e) { VideoFolder vfc = (VideoFolder)e.Parameter; if (e.Parameter is VideoFolderChild) { HomePlaylistService.CreateNewPlayList(vfc.FullName); } else { List <string> listpath = GetListPath(vfc); if (listpath.Count > 0) { PlaylistModel playlistModel = new PlaylistModel(); foreach (var item in listpath) { playlistModel.Add(new Pathlist(item)); } HomePlaylistService.CreateNewPlayList(playlistModel); } } }
public void CreateNewPlayList(string ItemPath) { RenameDialog renameDialog = new RenameDialog { Owner = (Shell as Window), WindowStartupLocation = WindowStartupLocation.CenterOwner }; renameDialog.ShowDialog(); if (renameDialog.DialogResult == false) { return; } string PlaylistName = renameDialog.RenameText.Text; PlaylistModel plm = new PlaylistModel { PlaylistName = PlaylistName }; plm.Add(ItemPath); AddToPlayList(plm); }