|
@@ -117,6 +117,61 @@ namespace PDF_Office.ViewModels.FillAndSign
|
|
|
}
|
|
|
|
|
|
|
|
|
+ //当不是注释模板,且无创建注释时,属性面板显示为空内容
|
|
|
+ if (isTemplateAnnot == false && annotArgs == null)
|
|
|
+ {
|
|
|
+ PDFViewer.SetMouseMode(MouseModes.PanTool);
|
|
|
+ viewContentViewModel.SelectedPrpoertyPanel("PropertyPanelContent", null);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ if (isSnapshotEdit == true)
|
|
|
+ {
|
|
|
+ ShowPropertyPanel(false);
|
|
|
+ isSnapshotEdit = false;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ ShowPropertyPanel(true);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ private void InitCheckedEvent(string e)
|
|
|
+ {
|
|
|
+ IsEdit = false;
|
|
|
+
|
|
|
+
|
|
|
+ //NavigateToProperty(control.Name);
|
|
|
+ //不创建注释,属于注释模板
|
|
|
+ bool isTemplateAnnot = false;
|
|
|
+ bool isSnapshotEdit = false;
|
|
|
+ AnnotHandlerEventArgs annotArgs = null;
|
|
|
+
|
|
|
+
|
|
|
+ var tag = e;
|
|
|
+ FindAnnotTypeKey(e, ref annotArgs);
|
|
|
+ if (e == "RbtnSign") { isTemplateAnnot = true; }
|
|
|
+
|
|
|
+
|
|
|
+ if (tag == "SnapshotEdit")
|
|
|
+ {
|
|
|
+ isSnapshotEdit = true;
|
|
|
+ }
|
|
|
+ else if (tag == "Signature" || tag == "Stamp")
|
|
|
+ {
|
|
|
+ isTemplateAnnot = true;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (annotArgs != null)
|
|
|
+ {
|
|
|
+ annotArgs.Author = Settings.Default.AppProperties.Description.Author;
|
|
|
+ PDFViewer.SetMouseMode(MouseModes.AnnotCreate);
|
|
|
+ PDFViewer.SetToolParam(annotArgs);
|
|
|
+ isRightMenuAddAnnot = false;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
//当不是注释模板,且无创建注释时,属性面板显示为空内容
|
|
|
if (isTemplateAnnot == false && annotArgs == null)
|
|
|
{
|
|
@@ -483,7 +538,7 @@ namespace PDF_Office.ViewModels.FillAndSign
|
|
|
|
|
|
}
|
|
|
|
|
|
- if (annotAttribsList != null && annotAttribsList.Count != 0)
|
|
|
+ if (annotAttribsList != null && annotAttribsList.Count != 0&&annots != null && annots.Count != 0)
|
|
|
{
|
|
|
if (annots.Count > 1)
|
|
|
{
|
|
@@ -1107,6 +1162,7 @@ namespace PDF_Office.ViewModels.FillAndSign
|
|
|
navigationContext.Parameters.TryGetValue<ViewContentViewModel>(ParameterNames.ViewContentViewModel, out viewContentViewModel);
|
|
|
navigationContext.Parameters.TryGetValue<CPDFViewer>(ParameterNames.PDFViewer, out PDFViewer);
|
|
|
BindingPDFViewerHandler();
|
|
|
+ InitCheckedEvent("RbtnTick");
|
|
|
IsEdit = false;
|
|
|
}
|
|
|
#endregion
|