コード例 #1
0
        private void OnToolModeChanged(object sender, ToolModeChangedEventArgs e)
        {
            if (e.NewToolMode != SilverDox.Controls.DocumentViewer.ToolModes.AnnotationEdit)
            {
                this.DocumentViewer.AnnotationManager.DeselectAllAnnotations();
            }

            if (e.NewToolMode.ToString().StartsWith("AnnotationCreate"))
            {
                Markup defaultAnnotation = (this.DocumentViewer.AnnotationManager != null) ?
                                           (DocumentViewer.AnnotationManager.DefaultAnnotation as Markup) : (null);

                if (defaultAnnotation != null)
                {
                    this.SetAnnotationDefaultProperties(defaultAnnotation);
                }
            }
        }
コード例 #2
0
        private void OnToolModeChanged(object sender, ToolModeChangedEventArgs e)
        {
            if( e.NewToolMode != SilverDox.Controls.DocumentViewer.ToolModes.AnnotationEdit)
                this.DocumentViewer.AnnotationManager.DeselectAllAnnotations();

            if (e.NewToolMode.ToString().StartsWith("AnnotationCreate"))
            {
                Markup defaultAnnotation = (this.DocumentViewer.AnnotationManager != null) ?
                    (DocumentViewer.AnnotationManager.DefaultAnnotation as Markup) : (null);

                if (defaultAnnotation != null)
                {
                    this.SetAnnotationDefaultProperties(defaultAnnotation);
                }
            }
        }