public void InitDataSource() { if (!MovieDataSource.HasDataSource && !MovieDataSource.IsLoadingData) { MovieDataSource.InitFileLoading(); } }
public VideoFolder LoadParentFiles(VideoFolder Parentdir, IList <DirectoryInfo> SubDirectory, SortType sorttype) { VideoFolder videoFolder = new VideoFolder(Parentdir, SubDirectory[0].Parent.FullName); var children = new ObservableCollection <VideoFolder>(); LoadParentSubDirectories(SubDirectory, children, videoFolder); videoFolder.OtherFiles = children; GetFolderItems(videoFolder); MovieDataSource.InitFileLoading(); return(videoFolder); }
public VideoFolder LoadParentFiles(VideoFolder Parentdir, IList <FileInfo> SubFiles, SortType sorttype) { VideoFolder videoFolder = new VideoFolder(Parentdir, SubFiles[0].Directory.FullName); var children = new ObservableCollection <VideoFolder>(); children = LoadChildrenFiles(videoFolder, SubFiles); videoFolder.OtherFiles = children; videoFolder.HasSubFolders = false; GetFolderItems(videoFolder); MovieDataSource.InitFileLoading(); return(videoFolder); }
public void RemoveFromDataSource(VideoFolder existingVideoFolder) { if (existingVideoFolder == null) { return; } switch (existingVideoFolder.FileType) { case FileType.Folder: MovieDataSource.InitFileLoading(); break; case FileType.File: if (MovieDataSource.DataSource.ContainsKey(existingVideoFolder.FullName)) { MovieDataSource.DataSource.Remove(existingVideoFolder.FullName); } break; default: break; } }