|
@@ -47,33 +47,14 @@ namespace Compdfkit_Tools.Measure
|
|
|
private CPDFAnnotation currentAnnot = null;
|
|
|
|
|
|
public event EventHandler ExpandEvent;
|
|
|
+ public event EventHandler OnAnnotEditHandler;
|
|
|
+
|
|
|
|
|
|
public MeasureControl()
|
|
|
{
|
|
|
InitializeComponent();
|
|
|
- //MeasureSetting.MeasureChanged += MeasureSetting_MeasureChanged;
|
|
|
- }
|
|
|
-
|
|
|
- //private void MeasureSetting_MeasureChanged(object sender, MeasureEventArgs e)
|
|
|
- //{
|
|
|
- // InfoPanel.SetMeasureType(e.Type);
|
|
|
- // InfoPanel.SetMeasureInfo(e);
|
|
|
-
|
|
|
- // switch (e.Type)
|
|
|
- // {
|
|
|
- // case CPDFMeasureType.CPDF_DISTANCE_MEASURE:
|
|
|
- // case CPDFMeasureType.CPDF_PERIMETER_MEASURE:
|
|
|
- // SettingPanel.ShowAreaAndLength(Visibility.Collapsed);
|
|
|
- // break;
|
|
|
- // case CPDFMeasureType.CPDF_AREA_MEASURE:
|
|
|
- // SettingPanel.ShowAreaAndLength(Visibility.Visible);
|
|
|
- // break;
|
|
|
- // default:
|
|
|
- // break;
|
|
|
- // }
|
|
|
-
|
|
|
- // SettingPanel.BindMeasureSetting(e);
|
|
|
- //}
|
|
|
+ }
|
|
|
+
|
|
|
#region Init PDFViewer
|
|
|
|
|
|
public void InitWithPDFViewer(PDFViewControl pdfViewControl)
|
|
@@ -265,7 +246,10 @@ namespace Compdfkit_Tools.Measure
|
|
|
|
|
|
private void PDFToolManager_MouseLeftButtonUpHandler(object sender, MouseEventObject e)
|
|
|
{
|
|
|
-
|
|
|
+ if (e.IsCreate)
|
|
|
+ {
|
|
|
+ OnAnnotEditHandler?.Invoke(this, EventArgs.Empty);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
private void PDFToolManager_MouseLeftButtonDownHandler(object sender, MouseEventObject e)
|