ソースを参照

compdfkit(win) - 测量Demo 注释列表图标

liyuxuan 1 年間 前
コミット
5e525a4ead

+ 26 - 0
Demo/Examples/Compdfkit_Tools/Annotation/PDFAnnotationList/PDFAnnotationListUI/CPDFAnnoationListUI.xaml

@@ -99,6 +99,32 @@
                                 <Grid x:Name="StampGrid" Visibility="{Binding BindProperty.CurrentAnnotationType, Converter={StaticResource AnnotArgsTypeToVisibilityConverter}, ConverterParameter = AnnotStamp}">
                                     <Path Data="M9.98201 7.97521C11.1875 7.28619 12 5.98798 12 4.5C12 2.29086 10.2091 0.5 8 0.5C5.79086 0.5 4 2.29086 4 4.5C4 5.98798 4.81248 7.2862 6.018 7.97522C6.10745 8.10318 6.5 8.69622 6.5 9.25C6.5 9.875 6 10.5 6 10.5H0V12H16V10.5H10C10 10.5 9.5 9.875 9.5 9.25C9.5 8.69621 9.89256 8.10316 9.98201 7.97521ZM16 15.5V14H0V15.5H16Z" Fill="#43474D"></Path>
                                 </Grid>
+                                <Grid x:Name="LineMeasureGrid" Visibility="{Binding BindProperty.CurrentAnnotationType, Converter={StaticResource AnnotArgsTypeToVisibilityConverter}, ConverterParameter = LineMeasure}">
+                                    <Path Fill="#43474D">
+                                        <Path.Data>
+                                            M17.7782 5.75646L14.2427 2.22093L13.0052 3.45837L15.4802 5.93333L14.4195 6.99399L11.9446 4.51903L10.1768
+                                            6.28679L12.6518 8.76175L11.5911 9.82241L9.11615 7.34745L7.34838 9.11522L9.82334 11.5902L8.76268
+                                            12.6508L6.28772 10.1759L4.51996 11.9436L6.99492 14.4186L5.93426 15.4793L3.4593 13.0043L2.22186
+                                            14.2417L5.75739 17.7773L17.7782 5.75646ZM15.3033 1.16027L14.2427 0.0996094L13.182 1.16027L1.1612
+                                            13.1811L0.100539 14.2417L1.1612 15.3024L4.69673 18.8379L5.75739 19.8986L6.81805 18.8379L18.8389 
+                                            6.81712L19.8995 5.75646L18.8389 4.6958L15.3033 1.16027Z
+                                        </Path.Data>
+                                    </Path>
+                                </Grid>
+                                <Grid x:Name="PolyLineMeasureGrid" Visibility="{Binding BindProperty.CurrentAnnotationType, Converter={StaticResource AnnotArgsTypeToVisibilityConverter}, ConverterParameter = PolyLineMeasure}">
+                                    <Path Fill="#43474D">
+                                        <Path.Data>
+                                            M0.5 3C0.5 1.89543 1.39543 1 2.5 1C3.33934 1 4.05793 1.51704 4.35462 2.25H15.6454C15.9421 1.51704 16.6607 1 
+                                            17.5 1C18.6046 1 19.5 1.89543 19.5 3C19.5 3.83934 18.983 4.55793 18.25 4.85462V17V17.75H17.5H13.7011L14.5167
+                                            18.5765L13.5138 19.5928L11.4986 17.5505L10.9972 17.0423L11.4986 16.5342L13.5138 14.4918L14.5167 15.5082L13.7847
+                                            16.25H16.75V4.85462C16.2487 4.65168 15.8483 4.25135 15.6454 3.75H4.35462C4.15168 4.25135 3.75135 4.65168 3.25
+                                            4.85462V16.25H6.25V15H7.75V19H6.25V17.75H2.5H1.75V17V4.85462C1.01704 4.55793 0.5 3.83934 0.5 3Z
+                                        </Path.Data>
+                                    </Path>
+                                </Grid>
+                                <Grid x:Name="PolygonMeasureGrid" Visibility="{Binding BindProperty.CurrentAnnotationType, Converter={StaticResource AnnotArgsTypeToVisibilityConverter}, ConverterParameter = PolygonMeasure}">
+                                    <Path Data="M1.37111 7.6963L10 1.42705L18.6289 7.6963L15.3329 17.8402H4.66705L1.37111 7.6963Z" Stroke="#43474D"></Path>
+                                </Grid>
                             </Canvas>
                             <TextBlock Text="{Binding BindProperty.CreateDate}" Grid.Column="1" Margin="10,0,0,0"></TextBlock>
                         </Grid>

+ 4 - 0
Demo/Examples/Compdfkit_Tools/Measure/MeasureControl.xaml.cs

@@ -204,6 +204,10 @@ namespace Compdfkit_Tools.Measure
 
         public void SetInfoPanelVisble(bool measureInfo, bool measureSetting)
         {
+            if(measureInfo)
+            {
+                InfoPanel.ClearMeasureInfo();
+            }
             InfoPanel.Visibility = measureInfo ? Visibility.Visible : Visibility.Collapsed;
             SettingPanel.Visibility = measureSetting ? Visibility.Visible : Visibility.Collapsed;
         }

+ 7 - 0
Demo/Examples/Measure/MainWindow.xaml.cs

@@ -123,6 +123,8 @@ namespace Measure
             pdfViewControl.PDFView.InfoChanged += PdfViewer_InfoChanged;
             pdfViewControl.PDFView.AnnotCommandHandler -= PDFView_AnnotCommandHandler;
             pdfViewControl.PDFView.AnnotCommandHandler += PDFView_AnnotCommandHandler;
+            pdfViewControl.PDFView.AnnotEditHandler -= PDFView_AnnotEditHandler;
+            pdfViewControl.PDFView.AnnotEditHandler += PDFView_AnnotEditHandler;
             pdfViewControl.PDFView.UndoManager.PropertyChanged -= UndoManager_PropertyChanged;
             pdfViewControl.PDFView.UndoManager.PropertyChanged += UndoManager_PropertyChanged;
             pdfViewControl.PDFView.SetFormFieldHighlight(true);
@@ -144,6 +146,11 @@ namespace Measure
             LoadMeasureRes();
         }
 
+        private void PDFView_AnnotEditHandler(object sender, List<AnnotEditEvent> e)
+        {
+            BotaSideTool.LoadAnnotationList();
+        }
+
         private void LoadDefaultDocument()
         {
             string defaultFilePath = "PDF32000_2008.pdf";