12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394 |
- using ComPDFKitViewer.AnnotEvent;
- using ComPDFKitViewer.PdfViewer;
- using PDF_Office.Model;
- using Prism.Mvvm;
- using Prism.Regions;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace PDF_Office.ViewModels.Form
- {
- public class SignPropertyViewModel : BindableBase, INavigationAware
- {
- #region 属性
- #endregion
- #region Command
- #endregion
- #region 变量
- private CPDFViewer PDFViewer;
- private WidgetSignArgs signArgs;
- #endregion
- #region 初始化
- public SignPropertyViewModel()
- {
- InitVariable();
- InitCommand();
- }
- private void InitVariable()
- {
- }
- private void InitCommand()
- {
- }
- #endregion
- #region 一般处理
- #endregion
- #region 外观处理
- #endregion
- #region 选项处理
- #endregion
- #region Navegation
- public bool IsNavigationTarget(NavigationContext navigationContext)
- {
- return true;
- }
- public void OnNavigatedFrom(NavigationContext navigationContext)
- {
- signArgs = null;
- }
- public void OnNavigatedTo(NavigationContext navigationContext)
- {
- navigationContext.Parameters.TryGetValue<CPDFViewer>(ParameterNames.PDFViewer, out PDFViewer);
- navigationContext.Parameters.TryGetValue<WidgetSignArgs>("WidgetArgs", out signArgs);
- GetWidgeText();
- }
- private void GetWidgeText()
- {
- if (signArgs == null)
- {
- signArgs = new WidgetSignArgs();
- }
- PDFViewer.SetMouseMode(MouseModes.FormEditTool);
- PDFViewer.SetToolParam(signArgs);
- }
- #endregion
- }
- }
|