示例#1
0
        private void ExpandTags()
        {
            FeatureTrackingManager.Instance.UseFeature(Features.Brainstorm_ExploreLibrary_Document_Tags);

            PDFDocument pdf_document = pdf_document_node_content.PDFDocument;

            foreach (string tag in TagTools.ConvertTagBundleToTags(pdf_document.Tags))
            {
                PDFTagNodeContent pdf_tag = new PDFTagNodeContent(pdf_document.Library.WebLibraryDetail.Id, tag);
                NodeControlAddingByKeyboard.AddChildToNodeControl(node_control, pdf_tag, false);
            }
        }
示例#2
0
        public PDFTagNodeContentControl(NodeControl node_control, PDFTagNodeContent pdf_tag_node_content)
        {
            this.node_control         = node_control;
            this.pdf_tag_node_content = pdf_tag_node_content;
            this.DataContext          = pdf_tag_node_content;

            InitializeComponent();

            this.Focusable = true;

            this.ImageIcon.Source = Icons.GetAppIcon(Icons.BrainstormPDFTag);

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

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

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

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

            FeatureTrackingManager.Instance.UseFeature(Features.Brainstorm_ExploreLibrary_Document_Tags);

            if (doc != null)
            {
                var tags = TagTools.ConvertTagBundleToTags(doc.Tags);

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

                    foreach (string tag in tags)
                    {
                        PDFTagNodeContent pdf_tag = new PDFTagNodeContent(doc.LibraryRef.Id, tag);
                        NodeControlAddingByKeyboard.AddChildToNodeControl(node_control, pdf_tag, false);
                    }
                });
            }
        }
 public PDFTagNodeContentEditor(NodeControl node_control, PDFTagNodeContent pdf_tag_node_content)
 {
     InitializeComponent();
 }