Ejemplo n.º 1
0
 void IViewModel.OnCollapse(IViewTreeNode node)
 {
     if (node is Node impl)
     {
         lastSetExpanded = lastSetExpanded.Remove(impl.Id);
         changeNotification.Post();
     }
 }
Ejemplo n.º 2
0
 void IViewModel.OnSelect(IViewTreeNode node)
 {
     if (node is Node impl)
     {
         lastSetSelected = impl.Id;
         changeNotification.Post();
     }
 }
Ejemplo n.º 3
0
 void IViewModel.OnExpand(IViewTreeNode node)
 {
     if (node is Node impl)
     {
         lastSetExpanded = lastSetExpanded.Add(impl.Id);
         changeNotification.Post();
     }
 }
        NSView CreateTreeNodeView(IViewTreeNode node)
        {
            var view = (NSTextField)treeView.MakeView("view", this);

            if (view == null)
            {
                view      = NSTextField.CreateLabel("");
                view.Font = NSFont.SystemFontOfSize(NSFont.SmallSystemFontSize);
            }
            view.StringValue = node.Text;
            return(view);
        }