コード例 #1
0
        private void MenuConvertLegacyAnnotations_Click(object sender, RoutedEventArgs e)
        {
            popup.Close();

            SafeThreadPool.QueueUserWorkItem(o =>
            {
                int imported_count = 0;

                FeatureTrackingManager.Instance.UseFeature(Features.Library_ImportLegacyAnnotations);
                foreach (var pdf_document in pdf_documents)
                {
                    try
                    {
                        imported_count += LegacyAnnotationConvertor.ImportLegacyAnnotations(pdf_document);
                    }
                    catch (Exception ex)
                    {
                        Logging.Error(ex, "Error while importing legacy annotations.");
                    }
                }

                WPFDoEvents.InvokeAsyncInUIThread(() =>
                {
                    MessageBoxes.Info(imported_count + " legacy annotations imported.");
                });
            });
        }
コード例 #2
0
        void MenuConvertLegacyAnnotations_Click(object sender, RoutedEventArgs e)
        {
            popup.Close();

            int imported_count = 0;

            FeatureTrackingManager.Instance.UseFeature(Features.Library_ImportLegacyAnnotations);
            foreach (var pdf_document in pdf_documents)
            {
                try
                {
                    imported_count += LegacyAnnotationConvertor.ImportLegacyAnnotations(pdf_document);
                }
                catch (Exception ex)
                {
                    Logging.Error(ex, "Error while importing legacy annotations.");
                }
            }

            MessageBoxes.Info(imported_count + " legacy annotations imported.");
        }