1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- using ComPDFKitViewer.PdfViewer;
- using PDF_Office.Model;
- using PDF_Office.Model.PDFTool;
- using PDF_Office.Views.HomePanel.PDFTools;
- using Prism.Commands;
- using Prism.Mvvm;
- using Prism.Services.Dialogs;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace PDF_Office.ViewModels.HomePanel
- {
- public class HomeGuidContentViewModel:BindableBase
- {
- public IDialogService dialogs;
- public DelegateCommand<ToolItem> QuickToolsCommand { get; set; }
- public HomeGuidContentViewModel(IDialogService dialogService)
- {
- QuickToolsCommand = new DelegateCommand<ToolItem>(QuickTools_Click);
- dialogs = dialogService;
- }
- public void QuickTools_Click(ToolItem toolItem)
- {
- switch (toolItem.Tag)
- {
- case PDFToolType.Split:
- Split_Click();
- DialogParameters splitvalue = new DialogParameters();
- dialogs.ShowDialog(DialogNames.MainPageSplitDialog, splitvalue, e => { });
- break;
- case PDFToolType.Extract:
- DialogParameters extractvalue = new DialogParameters();
- dialogs.ShowDialog(DialogNames.MainPageExtractDialog, extractvalue, e => { });
- break;
- case PDFToolType.Insert:
- DialogParameters insertvalue = new DialogParameters();
- dialogs.ShowDialog(DialogNames.MainPageInsertDialog, insertvalue, e => { });
- break;
- case PDFToolType.Compress:
- break;
- case PDFToolType.Merge:
- break;
- case PDFToolType.Print:
- DialogParameters printvalue = new DialogParameters();
- dialogs.ShowDialog(DialogNames.MainPagePrinterDialog, printvalue, e => { });
- break;
- case PDFToolType.Security:
- break;
- }
- }
- private void Split_Click()
- {
- }
- }
- }
|