Exemple #1
0
        private void ExpandAutoTags()
        {
            FeatureTrackingManager.Instance.UseFeature(Features.Brainstorm_ExploreLibrary_Document_AutoTags);

            PDFDocument pdf_document = pdf_document_node_content.PDFDocument;

            HashSet <string> tags = pdf_document.Library.AITagManager.AITags.GetTagsWithDocument(pdf_document.Fingerprint);

            foreach (string tag in tags)
            {
                PDFAutoTagNodeContent pdf_auto_tag = new PDFAutoTagNodeContent(pdf_document.Library.WebLibraryDetail.Id, tag);
                NodeControlAddingByKeyboard.AddChildToNodeControl(node_control, pdf_auto_tag, false);
            }
        }
Exemple #2
0
        public PDFAutoTagNodeContentControl(NodeControl node_control, PDFAutoTagNodeContent pdf_auto_tag_node_content)
        {
            this.node_control = node_control;
            this.pdf_auto_tag_node_content = pdf_auto_tag_node_content;
            DataContext = pdf_auto_tag_node_content;

            InitializeComponent();

            Focusable = true;

            ImageIcon.Source = Icons.GetAppIcon(Icons.BrainstormPDFAutoTag);

            ImageIcon.Width         = NodeThemes.image_width;
            TextBorder.CornerRadius = NodeThemes.corner_radius;
            TextBorder.Background   = NodeThemes.background_brush;
        }
Exemple #3
0
        public override bool Equals(object obj)
        {
            PDFAutoTagNodeContent other = obj as PDFAutoTagNodeContent;

            if (null == other)
            {
                return(false);
            }

            if (library_id != other.library_id)
            {
                return(false);
            }
            if (tag != other.tag)
            {
                return(false);
            }

            return(true);
        }
Exemple #4
0
        private static void ExpandAutoTags(PDFDocument doc, NodeControl node_control)
        {
            WPFDoEvents.AssertThisCodeIs_NOT_RunningInTheUIThread();
            ASSERT.Test(doc != null);

            FeatureTrackingManager.Instance.UseFeature(Features.Brainstorm_ExploreLibrary_Document_AutoTags);

            if (doc != null)
            {
                HashSet <string> tags = doc.LibraryRef.Xlibrary.AITagManager.AITags.GetTagsWithDocument(doc.Fingerprint);

                WPFDoEvents.InvokeInUIThread(() =>
                {
                    WPFDoEvents.AssertThisCodeIsRunningInTheUIThread();

                    foreach (string tag in tags)
                    {
                        PDFAutoTagNodeContent pdf_auto_tag = new PDFAutoTagNodeContent(doc.LibraryRef.Id, tag);
                        NodeControlAddingByKeyboard.AddChildToNodeControl(node_control, pdf_auto_tag, false);
                    }
                });
            }
        }
Exemple #5
0
 public PDFAutoTagNodeContentEditor(NodeControl node_control, PDFAutoTagNodeContent pdf_auto_tag_node_content)
 {
     InitializeComponent();
 }