Ejemplo n.º 1
0
 protected override void InitializeNodes(afh.Forms.TreeNodeCollection nodes)
 {
     foreach (Bookmark.BookmarkNode child in this.Value.Nodes)
     {
         BookmarkTreeNode childNode = new BookmarkTreeNode(child);
         if (this.DDBehaviorInherit == afh.Forms.TreeNodeInheritType.Custom)
         {
             childNode.DDBehavior = this.DDBehavior;
         }
         nodes.Add(childNode);
     }
 }
Ejemplo n.º 2
0
        private void button1_Click(object sender, System.EventArgs e)
        {
            if (Forms::DialogResult.OK != this.openFileDialog1.ShowDialog(this))
            {
                return;
            }
            string html = System.IO.File.ReadAllText(this.openFileDialog1.FileName);

            afh.HTML.HTMLDocument document = afh.HTML.HTMLDocument.Parse(html);
            Bookmark.BookmarkTree tree     = mwg.Link.Bookmark.BookmarkTree.CreateFromBookmarkHtml(document);

            BookmarkTreeNode root = new BookmarkTreeNode(tree.RootNode);

            root.SetupAutoDD();
            this.treeView1.Nodes.Add(root);
        }