Exemplo n.º 1
0
        protected void OnTreeAfterSelect(Object sender, TreeViewEventArgs e)
        {
            ManticoreTreeNode node        = e.Node as ManticoreTreeNode;
            Bookmarks         bmks        = ServiceManager.Bookmarks;
            String            bookmarkURL = bmks.GetBookmarkAttribute(node.Data as String, "url");

            mStatusBar.Text = bookmarkURL;
        }
Exemplo n.º 2
0
        protected void OnTreeDoubleClick(Object sender, EventArgs e)
        {
            ManticoreTreeNode node        = mBookmarksTree.SelectedNode as ManticoreTreeNode;
            Bookmarks         bmks        = ServiceManager.Bookmarks;
            String            bookmarkURL = bmks.GetBookmarkAttribute(node.Data as String, "url");

            if (bookmarkURL != "")
            {
                WindowMediator wm     = ServiceManager.WindowMediator;
                BrowserWindow  window = wm.GetMostRecentWindow("BrowserWindow") as BrowserWindow;
                if (window != null)
                {
                    window.LoadURL(bookmarkURL);
                }
            }
        }
Exemplo n.º 3
0
        public override bool ShouldBuild(CommandTarget aTarget)
        {
            Bookmarks bmks = ServiceManager.Bookmarks;

            if (mFilterAttributes != null)
            {
                IEnumerator criteria = mFilterAttributes.GetEnumerator();
                while (criteria.MoveNext())
                {
                    String[] singleCriteria = criteria.Current as String[];
                    if (bmks.GetBookmarkAttribute(aTarget.Data as String, singleCriteria[0]) != singleCriteria[1])
                    {
                        return(false);
                    }
                }
            }
            return(true);
        }