private void PreviousPage()
        {
            ArchivedVideos.Clear();

            var pagedDirectoryFiles = _pagingProcessor
                                      .GetPagedDirectoryFiles(VideoDirectory, _pageNumber, _pagePayload, PagingOperations.Previous, FileExtensions.AviExtension);

            CreateaArchivedVideos(pagedDirectoryFiles.Files);

            IsNextPageButtonVisible = pagedDirectoryFiles.IsNextPage;
        }
        private void SearchHandler(object param)
        {
            var textBox     = param as TextBox;
            var searchQuery = textBox.Text;

            ArchivedVideos         = ArchivedVideos.FilterObservableCollection(searchQuery);
            SearchButtonVisability = Visibility.Visible;

            RaisePropertyChanged("ArchivedVideos");
            RaisePropertyChanged("SearchButtonVisability");
        }
        private void SortByDate()
        {
            if (_isOrderedByDescending)
            {
                ArchivedVideos         = ArchivedVideos.SortObservableCollection(OrderingTypes.Ascending, x => x.CreationDate);
                _isOrderedByDescending = false;
            }
            else
            {
                ArchivedVideos         = ArchivedVideos.SortObservableCollection(OrderingTypes.Descending, x => x.CreationDate);
                _isOrderedByDescending = true;
            }

            RaisePropertyChanged("ArchivedVideos");
        }
        private void CreateaArchivedVideos(IEnumerable <FileInfo> filesInfo)
        {
            foreach (var file in filesInfo)
            {
                var archivedVideo = new ArchiveVideo
                {
                    Fullname     = file.FullName,
                    Name         = file.Name.Split('.').First(),
                    CreationDate = file.Name.GetDateFromFileName()
                };

                ShellFile thumbNail  = ShellFile.FromFilePath(archivedVideo.Fullname);
                var       thumbLarge = thumbNail.Thumbnail.LargeBitmap;
                archivedVideo.PreviewImage = thumbLarge.ToBitmapImage();

                ArchivedVideos.Add(archivedVideo);

                RaisePropertyChanged("ArchivedVideos");
            }
        }