Example #1
0
        public override NSView GetView(NSOutlineView outlineView, NSTableColumn tableColumn, NSObject item)
        {
            LeadingContentListOutlineViewNode node = item.GetOutlineViewNode();

            return(node.NodeType switch
            {
                ApplicationDetail => SetupApplicationDetailCellView(outlineView, node),
                _ => SetupDefaultTableCellView(outlineView, node),
            });
Example #2
0
        internal NSViewController?GetViewControllerForSelectedNodes(NSTreeNode[] nodes)
        {
            if (nodes?.Length == 0)
            {
                return(null);
            }

            LeadingContentListOutlineViewNode outlineViewNode = nodes.First().GetOutlineViewNode();

            return(outlineViewNode.NodeType switch
            {
                LeadingContentListOutlineViewNodeType.AppleDevAccount => new AppleDevAccountViewController(),
                LeadingContentListOutlineViewNodeType.ApplicationVersion => new ApplicationVersionViewController(),
                LeadingContentListOutlineViewNodeType.ApplicationDetail => new ApplicationDetailViewController(),
                Separator => null,
                _ => null,
            });
Example #3
0
        public override nfloat GetRowHeight(NSOutlineView outlineView, NSObject item)
        {
            LeadingContentListOutlineViewNode node = item.GetOutlineViewNode();

            return(node.NodeType.GetOutlineViewRowHeight());
        }
        public override bool ItemExpandable(NSOutlineView outlineView, NSObject item)
        {
            LeadingContentListOutlineViewNode node = item.GetOutlineViewNode();

            return(node.HasChildren);
        }
        public override NSObject GetObjectValue(NSOutlineView outlineView, NSTableColumn tableColumn, NSObject item)
        {
            LeadingContentListOutlineViewNode node = item.GetOutlineViewNode();

            return(new NSString(node.Title));
        }
        public override NSObject GetChild(NSOutlineView outlineView, nint childIndex, NSObject item)
        {
            LeadingContentListOutlineViewNode node = item.GetOutlineViewNode();

            return(node[(int)childIndex]);
        }
        public override nint GetChildrenCount(NSOutlineView outlineView, NSObject item)
        {
            LeadingContentListOutlineViewNode node = item.GetOutlineViewNode();

            return(node.Count);
        }