|
@@ -1,7 +1,10 @@
|
|
-using PDF_Office.Model.PDFTool;
|
|
|
|
|
|
+using ComPDFKitViewer.PdfViewer;
|
|
|
|
+using PDF_Office.Model;
|
|
|
|
+using PDF_Office.Model.PDFTool;
|
|
using PDF_Office.Views.HomePanel.PDFTools;
|
|
using PDF_Office.Views.HomePanel.PDFTools;
|
|
using Prism.Commands;
|
|
using Prism.Commands;
|
|
using Prism.Mvvm;
|
|
using Prism.Mvvm;
|
|
|
|
+using Prism.Services.Dialogs;
|
|
using System;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Linq;
|
|
@@ -12,10 +15,12 @@ namespace PDF_Office.ViewModels.HomePanel
|
|
{
|
|
{
|
|
public class HomeGuidContentViewModel:BindableBase
|
|
public class HomeGuidContentViewModel:BindableBase
|
|
{
|
|
{
|
|
|
|
+ public IDialogService dialogs;
|
|
public DelegateCommand<ToolItem> QuickToolsCommand { get; set; }
|
|
public DelegateCommand<ToolItem> QuickToolsCommand { get; set; }
|
|
- public HomeGuidContentViewModel()
|
|
|
|
|
|
+ public HomeGuidContentViewModel(IDialogService dialogService)
|
|
{
|
|
{
|
|
- QuickToolsCommand = new DelegateCommand<ToolItem>(QuickTools_Click);
|
|
|
|
|
|
+ QuickToolsCommand = new DelegateCommand<ToolItem>(QuickTools_Click);
|
|
|
|
+ dialogs = dialogService;
|
|
}
|
|
}
|
|
|
|
|
|
public void QuickTools_Click(ToolItem toolItem)
|
|
public void QuickTools_Click(ToolItem toolItem)
|
|
@@ -24,12 +29,18 @@ namespace PDF_Office.ViewModels.HomePanel
|
|
{
|
|
{
|
|
case PDFToolType.Split:
|
|
case PDFToolType.Split:
|
|
Split_Click();
|
|
Split_Click();
|
|
|
|
+ DialogParameters splitvalue = new DialogParameters();
|
|
|
|
+ dialogs.ShowDialog(DialogNames.MainPageSplitDialog, splitvalue, e => { });
|
|
break;
|
|
break;
|
|
|
|
|
|
case PDFToolType.Extract:
|
|
case PDFToolType.Extract:
|
|
|
|
+ DialogParameters extractvalue = new DialogParameters();
|
|
|
|
+ dialogs.ShowDialog(DialogNames.MainPageExtractDialog, extractvalue, e => { });
|
|
break;
|
|
break;
|
|
|
|
|
|
case PDFToolType.Insert:
|
|
case PDFToolType.Insert:
|
|
|
|
+ DialogParameters insertvalue = new DialogParameters();
|
|
|
|
+ dialogs.ShowDialog(DialogNames.MainPageInsertDialog, insertvalue, e => { });
|
|
break;
|
|
break;
|
|
|
|
|
|
case PDFToolType.Compress:
|
|
case PDFToolType.Compress:
|
|
@@ -39,6 +50,8 @@ namespace PDF_Office.ViewModels.HomePanel
|
|
break;
|
|
break;
|
|
|
|
|
|
case PDFToolType.Print:
|
|
case PDFToolType.Print:
|
|
|
|
+ DialogParameters printvalue = new DialogParameters();
|
|
|
|
+ dialogs.ShowDialog(DialogNames.MainPagePrinterDialog, printvalue, e => { });
|
|
break;
|
|
break;
|
|
|
|
|
|
case PDFToolType.Security:
|
|
case PDFToolType.Security:
|