using Microsoft.Win32;
using Prism.Commands;
using Prism.Mvvm;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ComPDFKitViewer.PdfViewer;
using Prism.Regions;
using DryIoc;
using System.Diagnostics;
using Prism.Services.Dialogs;
using PDF_Office.CustomControl;
using PDF_Office.Model;
using System.Windows;
using System.Windows.Controls;
namespace PDF_Office.ViewModels
{
public class ViewContentViewModel : BindableBase, INavigationAware
{
#region 属性、变量
private CPDFViewer PDFViewer { get; set; }
private MainContentViewModel mainViewModel { get; set; }
public IRegionManager region;
public IDialogService dialogs;
public string ViwerRegionName { get; set; }
public string BOTARegionName { get; set; }
public string PropertyRegionName { get; set; }
public string ToolContentRegionName { get; set; }
private int gridToolRow = 1;
///
/// 控制ToolContent的Row
///
public int GridToolRow
{
get { return gridToolRow; }
set
{
SetProperty(ref gridToolRow, value);
}
}
private int gridToolRowSpan = 3;
///
/// 控制ToolContent的RowSpan
///
public int GridToolRowSpan
{
get { return gridToolRowSpan; }
set
{
SetProperty(ref gridToolRowSpan, value);
}
}
private Visibility toolContentVisible = Visibility.Visible;
///
/// 控制Content的显示 用于显示水印、贝茨码、密文等功能模块
/// 留意:显示前需要先注入内容、设置好行和跨行数
///
public Visibility ToolContentVisible
{
get { return toolContentVisible; }
set
{
SetProperty(ref toolContentVisible, value);
}
}
///
/// 用来避免重复触发导航事件的标志符
///
private bool isOpenFile = false;
///
/// 鼠标滚轮缩放的缩放值
///
private double[] zoomLevel = { 1.00f, 10, 25, 50, 75, 100, 125, 150, 200, 300, 400, 600, 800, 1000 };
#endregion
#region 命令
public DelegateCommand LoadFile { get; set; }
public DelegateCommand Load { get; set; }
public DelegateCommand