|
@@ -44,14 +44,14 @@ namespace Compdfkit_Tools.PDFView
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
public RegularViewerControl()
|
|
|
{
|
|
|
InitializeComponent();
|
|
|
panelState.PropertyChanged -= PanelState_PropertyChanged;
|
|
|
panelState.PropertyChanged += PanelState_PropertyChanged;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
private void PanelState_PropertyChanged(object sender, PropertyChangedEventArgs e)
|
|
|
{
|
|
|
if (e.PropertyName == nameof(PanelState.IsLeftPanelExpand))
|
|
@@ -75,7 +75,7 @@ namespace Compdfkit_Tools.PDFView
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
public void ExpandLeftPanel(bool isExpand)
|
|
|
{
|
|
|
BotaContainer.Visibility = isExpand ? Visibility.Visible : Visibility.Collapsed;
|
|
@@ -91,26 +91,26 @@ namespace Compdfkit_Tools.PDFView
|
|
|
BodyGrid.ColumnDefinitions[1].Width = new GridLength(0);
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
public void ExpandRightPropertyPanel(UIElement propertytPanel, Visibility visible)
|
|
|
{
|
|
|
PropertyContainer.Width = 260;
|
|
|
PropertyContainer.Child = propertytPanel;
|
|
|
PropertyContainer.Visibility = visible;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
#region Init PDFViewer
|
|
|
|
|
|
private void InitialControl()
|
|
|
{
|
|
|
PdfViewControl.PDFView?.SetMouseMode(MouseModes.Viewer);
|
|
|
PdfViewControl.PDFView?.SetShowLink(true);
|
|
|
- PDFGrid.Child = PdfViewControl;
|
|
|
+ PDFGrid.Child = PdfViewControl;
|
|
|
PdfViewControl.PDFView.UndoManager.PropertyChanged -= UndoManager_PropertyChanged;
|
|
|
PdfViewControl.PDFView.UndoManager.PropertyChanged += UndoManager_PropertyChanged;
|
|
|
PdfViewControl.PDFView.SetFormFieldHighlight(true);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
public void InitWithPDFViewer(CPDFViewer pdfViewer)
|
|
|
{
|
|
|
PdfViewControl.PDFView = pdfViewer;
|
|
@@ -118,7 +118,7 @@ namespace Compdfkit_Tools.PDFView
|
|
|
FloatPageTool.InitWithPDFViewer(pdfViewer);
|
|
|
InitialControl();
|
|
|
DataContext = this;
|
|
|
- if(PdfViewControl!=null && PdfViewControl.PDFView!=null)
|
|
|
+ if (PdfViewControl != null && PdfViewControl.PDFView != null)
|
|
|
{
|
|
|
PdfViewControl.PDFView.AnnotCommandHandler -= PDFView_AnnotCommandHandler;
|
|
|
PdfViewControl.PDFView.AnnotCommandHandler += PDFView_AnnotCommandHandler;
|
|
@@ -132,15 +132,15 @@ namespace Compdfkit_Tools.PDFView
|
|
|
if ((e is WidgetSignArgs args))
|
|
|
{
|
|
|
var signatureWidget = args.Sign;
|
|
|
- if(signatureWidget != null)
|
|
|
+ if (signatureWidget != null)
|
|
|
{
|
|
|
CPDFSignature sig = signatureWidget.GetSignature(PdfViewControl.PDFView.Document);
|
|
|
- if (signatureWidget.IsSigned() && sig!=null && sig?.SignerList.Count > 0)
|
|
|
+ if (signatureWidget.IsSigned() && sig != null && sig?.SignerList.Count > 0)
|
|
|
{
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
if (args.WidgetType == C_WIDGET_TYPE.WIDGET_SIGNATUREFIELDS)
|
|
|
{
|
|
|
panelState.RightPanel = PanelState.RightPanelState.PropertyPanel;
|
|
@@ -150,7 +150,7 @@ namespace Compdfkit_Tools.PDFView
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
public void CancelWidgetClickHandler()
|
|
|
{
|
|
|
if (PdfViewControl != null && PdfViewControl.PDFView != null)
|
|
@@ -163,12 +163,12 @@ namespace Compdfkit_Tools.PDFView
|
|
|
{
|
|
|
this.BotaContainer.Child = botaControl;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
public void SetDisplaySettingsControl(CPDFDisplaySettingsControl displaySettingsControl)
|
|
|
{
|
|
|
this.displaySettingsControl = displaySettingsControl;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
public void SetSignatureStatusBarControl(SignatureStatusBarControl signatureStatusBarControl)
|
|
|
{
|
|
|
this.signatureStatusBarControl = signatureStatusBarControl;
|
|
@@ -184,16 +184,16 @@ namespace Compdfkit_Tools.PDFView
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
-
|
|
|
+
|
|
|
public void ClearViewerControl()
|
|
|
{
|
|
|
PDFGrid.Child = null;
|
|
|
BotaContainer.Child = null;
|
|
|
- PropertyContainer.Child= null;
|
|
|
+ PropertyContainer.Child = null;
|
|
|
SignatureStatusBorder.Child = null;
|
|
|
displaySettingsControl = null;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
#region PropertyChanged
|
|
|
|
|
|
/// <summary>
|
|
@@ -214,7 +214,7 @@ namespace Compdfkit_Tools.PDFView
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
-
|
|
|
+
|
|
|
#region Context Menu
|
|
|
|
|
|
private void ExtraImage_Click(object sender, RoutedEventArgs e)
|
|
@@ -295,7 +295,7 @@ namespace Compdfkit_Tools.PDFView
|
|
|
{
|
|
|
if (PdfViewControl != null)
|
|
|
{
|
|
|
- double newZoom = CommandHelper.CheckZoomLevel(zoomLevelList,PdfViewControl.PDFView.ZoomFactor + 0.01, true);
|
|
|
+ double newZoom = CommandHelper.CheckZoomLevel(zoomLevelList, PdfViewControl.PDFView.ZoomFactor + 0.01, true);
|
|
|
PdfViewControl.PDFView?.Zoom(newZoom);
|
|
|
}
|
|
|
};
|
|
@@ -308,7 +308,7 @@ namespace Compdfkit_Tools.PDFView
|
|
|
{
|
|
|
if (PdfViewControl != null)
|
|
|
{
|
|
|
- double newZoom = CommandHelper.CheckZoomLevel(zoomLevelList,PdfViewControl.PDFView.ZoomFactor - 0.01, false);
|
|
|
+ double newZoom = CommandHelper.CheckZoomLevel(zoomLevelList, PdfViewControl.PDFView.ZoomFactor - 0.01, false);
|
|
|
PdfViewControl.PDFView?.Zoom(newZoom);
|
|
|
}
|
|
|
};
|
|
@@ -385,6 +385,16 @@ namespace Compdfkit_Tools.PDFView
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ private void PopupMenu_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
|
|
|
+ {
|
|
|
+ throw new NotImplementedException();
|
|
|
+ }
|
|
|
+
|
|
|
+ private void CopyText_Click(object sender, RoutedEventArgs e)
|
|
|
+ {
|
|
|
+ throw new NotImplementedException();
|
|
|
+ }
|
|
|
+
|
|
|
#endregion
|
|
|
|
|
|
private void UserControl_Unloaded(object sender, RoutedEventArgs e)
|