コード例 #1
0
        private async void MergePages()
        {
            if (this.SelectedItems.Count < 2)
            {
                return;
            }

            IList<Page> selectedPages = this.CastSelectedItems();

            var docWithMergedPages = new Document(this.CurrentDocument.DocumentCategory);

            foreach (var page in selectedPages)
            {
                docWithMergedPages.Pages.Add(page);

                this.CurrentDocument.DocumentSize -= page.MbSize;

                this.CurrentDocument.Pages.Remove(page);
            }

            await SerializationProvider.Instance.AddDocument(docWithMergedPages);

            await SerializationProvider.Instance.UpdateDocument(this.CurrentDocument);

            var arguements = new DocumentPageArguements()
            {
                DocumentId = docWithMergedPages.ID,
                PreviousPageName = "DocumentView",
            };

            this.UpdatePageNumbers();

            this.NavigationContext.NavigationService.NavigateTo("DocumentView", arguements);
        }
コード例 #2
0
        private void DocumentItemClick(Document clickedItem)
        {
            var arguements = new DocumentPageArguements()
            {
                DocumentId = clickedItem.ID,
                PreviousPageName = "CurrentCategoryView",
            };

            this.NavigationContext.NavigationService.NavigateTo("DocumentView", arguements);
        }
コード例 #3
0
ファイル: PhotoViewModel.cs プロジェクト: epustovit/Scanner
        private async void DeletePage()
        {
            await SerializationProvider.Instance.DeletePages(new List<Guid>() { this.PageToProcces.ID}, 
                this.PageToProcces.DocumentId);

            var arguements = new DocumentPageArguements()
            {
                DocumentId = this.PageToProcces.DocumentId,
                PreviousPageName = "PhotoView",
            };

            this.NavigationContext.NavigationService.NavigateTo("DocumentView", arguements);
        }
コード例 #4
0
ファイル: MainViewModel.cs プロジェクト: epustovit/Scanner
        private void DocumentItemClick(Document clickedItem)
        {
            var arguements = new DocumentPageArguements()
            {
                DocumentId = clickedItem.ID,
                PreviousPageName = "MainView",
            };

            this.NavigationContext.NavigationService.NavigateTo(NavigationSource.DocumentView.ToString(),
                arguements);
        }