using ComPDFKit.PDFDocument;
using ComPDFKitViewer.PdfViewer;
using Microsoft.Office.Interop.Word;
using PDF_Office.CustomControl;
using PDF_Office.EventAggregators;
using PDF_Office.Helper;
using PDF_Office.Model;
using PDF_Office.Model.Dialog.ToolsDialogs.SaftyDialogs;
using Prism.Commands;
using Prism.Events;
using Prism.Mvvm;
using Prism.Regions;
using Prism.Services.Dialogs;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Security.Cryptography.X509Certificates;
using System.Windows;
using System.Threading.Tasks;
using static PDF_Office.Model.Dialog.ToolsDialogs.SaftyDialogs.DeleteSafetySettintgsModel;
using Task = System.Threading.Tasks.Task;
using PDF_Office.Model.Dialog.ToolsDialogs;
namespace PDF_Office.ViewModels.Tools
{
public class ToolsBarContentViewModel : BindableBase, INavigationAware
{
private CPDFViewer PDFViewer;
private ViewContentViewModel viewContentViewModel;
public IDialogService dialogs;
public IEventAggregator eventAggregator;
private IntPtr compressingIntpr = IntPtr.Zero;
private CPDFDocument.GetPageIndexDelegate indexDelegate = null;
private CPDFDocument tempDocument;
public string unicode = null;
///
/// 是否是第一次加载
///
private bool isFirstLoad = true;
private string _pageIndex = "0";
///
/// 当前页
///
public string PageIndex
{
get { return _pageIndex; }
set
{
SetProperty(ref _pageIndex, value);
App.mainWindowViewModel.Value = int.Parse(PageIndex);
}
}
private string _pageNumber = "";
///
/// 总页数
///
public string PageNumber
{
get { return _pageNumber; }
set
{
SetProperty(ref _pageNumber, value);
App.mainWindowViewModel.MaxValue = int.Parse(PageNumber);
}
}
public DelegateCommand CompressCommand { get; set; }
public DelegateCommand MergeCommand { get; set; }
public DelegateCommand SetPasswordCommand { get; set; }
public DelegateCommand CancelPasswordCommand { get; set; }
public DelegateCommand