|
@@ -45,6 +45,9 @@ namespace Compdfkit_Tools.PDFControl
|
|
|
|
|
|
#region Properties
|
|
|
|
|
|
+ private double splitWidthScale = 0.5;
|
|
|
+ private double splitHeightScale = 0.5;
|
|
|
+
|
|
|
public bool CustomSignHandle { get; set; }
|
|
|
|
|
|
private double[] zoomLevelList = { 1f, 8f, 12f, 25, 33f, 50, 66f, 75, 100, 125, 150, 200, 300, 400, 600, 800, 1000 };
|
|
@@ -89,6 +92,7 @@ namespace Compdfkit_Tools.PDFControl
|
|
|
splitToolManager.MouseLeftButtonDownHandler -= PDFToolManager_MouseLeftButtonDownHandler;
|
|
|
splitToolManager.MouseLeftButtonUpHandler -= PDFToolManager_MouseLeftButtonUpHandler;
|
|
|
splitToolManager.MouseMoveHandler -= PDFToolManager_MouseMoveHandler;
|
|
|
+ splitToolManager.AnnotDefaultEditedHandler -= PDFToolManager_AnnotDefaultEditedHandler;
|
|
|
|
|
|
splitViewerTool.SizeChanged += SplitViewerTool_SizeChanged;
|
|
|
splitViewerTool.GetCPDFViewer().MouseWheelZoomHandler += SplitPDFViewControl_MouseWheelZoomHandler;
|
|
@@ -137,6 +141,14 @@ namespace Compdfkit_Tools.PDFControl
|
|
|
|
|
|
private void SplitViewerTool_SizeChanged(object sender, SizeChangedEventArgs e)
|
|
|
{
|
|
|
+ if (VerticalView.Visibility == Visibility.Visible)
|
|
|
+ {
|
|
|
+ splitWidthScale = VerticalView.ActualWidth / ViewToolGrid.ActualWidth;
|
|
|
+ }
|
|
|
+ if (HorizontalView.Visibility == Visibility.Visible)
|
|
|
+ {
|
|
|
+ splitHeightScale = HorizontalView.ActualHeight / ViewToolGrid.ActualHeight;
|
|
|
+ }
|
|
|
splitViewerTool.GetCPDFViewer().UpDateRenderFrame();
|
|
|
}
|
|
|
|
|
@@ -329,6 +341,18 @@ namespace Compdfkit_Tools.PDFControl
|
|
|
HorizontalView.Child = null;
|
|
|
}
|
|
|
|
|
|
+ public void WindowSizeChange()
|
|
|
+ {
|
|
|
+ if(VerticalView.Visibility == Visibility.Visible)
|
|
|
+ {
|
|
|
+ ViewToolGrid.ColumnDefinitions[2].Width = new GridLength(ViewToolGrid.ActualWidth * splitWidthScale);
|
|
|
+ }
|
|
|
+ if(HorizontalView.Visibility == Visibility.Visible)
|
|
|
+ {
|
|
|
+ ViewToolGrid.RowDefinitions[2].Height = new GridLength(ViewToolGrid.ActualHeight * splitHeightScale);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
private void PDFView_GotFocus(object sender, RoutedEventArgs e)
|
|
|
{
|
|
|
switch((sender as Border).Tag)
|