Example #1
0
        protected void OnAfterCollapse(Object sender, TreeViewEventArgs e)
        {
            ManticoreTreeNode node   = e.Node as ManticoreTreeNode;
            String            nodeID = node.Data as String;
            Bookmarks         bmks   = ServiceManager.Bookmarks;

            bmks.SetBookmarkAttribute(nodeID, "open", "false");
            node.ImageIndex = 0;
        }
Example #2
0
        protected void OnAfterLabelEdit(Object sender, NodeLabelEditEventArgs e)
        {
            ManticoreTreeNode root = GetRootItem();

            if (root != null && e.Label != "")
            {
                ManticoreTreeNode temp       = e.Node as ManticoreTreeNode;
                String            parentID   = root.Data as String;
                Bookmarks         bmks       = ServiceManager.Bookmarks;
                String            bookmarkID = bmks.CreateBookmark(e.Label, parentID, -1);
                bmks.SetBookmarkAttribute(bookmarkID, "container", "true");
                bmks.SetBookmarkAttribute(bookmarkID, "open", "true");
                e.Node.Text = "FruitLoop";
                e.Node.EndEdit(false);
                root.Nodes.Remove(temp);
                LabelEdit = false;
            }
            else
            {
                e.Node.EndEdit(true);
            }
        }
Example #3
0
        private void mOKButton_Click(object sender, System.EventArgs e)
        {
            String            destinationFolder = "Bookmarks"; // XXX Parameterize this
            ManticoreTreeNode node = mFolderTree.SelectedNode as ManticoreTreeNode;

            if (node != null)
            {
                destinationFolder = node.Data as String;
            }
            Bookmarks bmks       = ServiceManager.Bookmarks;
            String    bookmarkID = bmks.CreateBookmark(mNameField.Text, destinationFolder, -1);

            bmks.SetBookmarkAttribute(bookmarkID, "url", mLocationField.Text);
            Close();
        }