Exemplo n.º 1
0
        private void RemoveFolders(ref ObservableCollection <MovieFolderModel> removedFolder)
        {
            if (removedFolder != null && removedFolder.Count == 0)
            {
                return;
            }
            foreach (var item in removedFolder)
            {
                VideoFolder videoFolder = null;
                if (DataSource != null)
                {
                    DataSource.TryGetValue(item.FullName, out videoFolder);
                }

                if (videoFolder == null)
                {
                    videoFolder = AllFoldersList.Where(x => x.FilePath.Equals(item.FullName)).FirstOrDefault();
                }
                RemoveVideoItem(videoFolder);
                if (videoFolder != null)
                {
                    videoFolder.Dispose();
                }
            }
        }
Exemplo n.º 2
0
 private bool RemoveVideoItem(VideoFolder videoFolder)
 {
     if (!AllFoldersList.Contains(videoFolder))
     {
         return(false);
     }
     AllFoldersList.Remove(videoFolder);
     return(true);
 }
Exemplo n.º 3
0
 private bool AddVideoItem(VideoFolder videoFolder)
 {
     if (AllFoldersList.Contains(videoFolder))
     {
         return(false);
     }
     AllFoldersList.Add(videoFolder);
     videoFolder.IsLoading = true;
     return(true);
 }