Наследование: Cocoa.Object
Пример #1
0
        public int OutlineViewNumberOfChildrenOfItem(OutlineView outlineView, BrowserItem item)
        {
            BrowserItem bi    = item as BrowserItem;
            int         count = bi != null ? bi.Count : help_tree.Nodes.Count;

            return(count);
        }
Пример #2
0
        public void outlineViewDoubleAction(Cocoa.Object sender)
        {
            BrowserItem bi = outlineView.SelectedItem as BrowserItem;

            try {
                if (bi.node.URL != null)
                {
                    Node   n;
                    string content = "";
                    if (bi.node.tree != null && bi.node.tree.HelpSource != null)
                    {
                        content = bi.node.tree.HelpSource.GetText(bi.node.URL, out n);
                    }
                    if (content == null || content.Equals(""))
                    {
                        content = help_tree.RenderUrl(bi.node.URL, out n);
                    }
                    content = content.Replace("a href='", "a href='http://monodoc/load?");
                    content = content.Replace("a href=\"", "a href=\"http://monodoc/load?");
                    webView.Render(content);
                    addHistoryItem(bi.node.URL);

                    outlineView.ExpandItem(bi);
                }
            } catch (Exception e) { Console.WriteLine("ERROR: " + e); }
        }
Пример #3
0
        public object OutlineViewChildOfItem(OutlineView outlineView, int index, BrowserItem item)
        {
            BrowserItem bi = item as BrowserItem;

            if (bi != null)
            {
                bi = bi.ItemAt(index);
            }
            else
            {
                bi = (BrowserItem)items[index];
            }
            return(bi);
        }
Пример #4
0
        public object OutlineViewObjectValueForTableColumnByItem(OutlineView outlineView, TableColumn tableColumn, BrowserItem item)
        {
            BrowserItem bi = item as BrowserItem;

            return(bi == null ? null : bi.ValueAt(tableColumn.Identifier));
        }
Пример #5
0
 public bool OutlineViewIsItemExpandable(OutlineView outlineView, BrowserItem item)
 {
     return(OutlineViewNumberOfChildrenOfItem(outlineView, item) > 0);
 }