private void AddtoPlayList_executed(object sender, ExecutedRoutedEventArgs e) { VideoFolderChild vfc = (VideoFolderChild)e.Parameter; if (vfc != null) { IPlayFile.AddFiletoPlayList(vfc); } }
private void AddtoPlayList_executed(object sender, ExecutedRoutedEventArgs e) { if (e.Parameter is VideoFolderChild) { IVideoData vfc = (VideoFolderChild)e.Parameter; IPlayFile.AddFiletoPlayList(vfc); return; } IFolder videofolder = e.Parameter as VideoFolder; IPlayFile.AddFiletoPlayList(videofolder); }
private void AddTo_executed(object sender, ExecutedRoutedEventArgs e) { var selectedplaylist = e.Parameter as PlaylistModel; VideoFolder vf = ((e.OriginalSource as Button).DataContext as VideoFolder); if (selectedplaylist.IsActive && vf != null) { IPlayFile.AddFiletoPlayList(vf); } else { selectedplaylist.Add(vf.FullName); } }
private void AddTo_executed(object sender, ExecutedRoutedEventArgs e) { var selectedplaylist = e.Parameter as PlaylistModel; VideoFolder vf = ((e.Source as IFileViewer).FileExplorer as IFileExplorer) .ContextMenuObject as VideoFolder; if (selectedplaylist.IsActive) { IPlayFile.AddFiletoPlayList(vf); } else { selectedplaylist.Add(vf.Directory.FullName); } }