コード例 #1
0
ファイル: NodeData.cs プロジェクト: skyronic/TFAddin
 public NodeData()
 {
     children = new List<NodeData> ();
     data = new Hashtable ();
     parent = null;
     log = new LogUtil ("NodeData");
 }
コード例 #2
0
ファイル: ProviderData.cs プロジェクト: skyronic/TFAddin
 public override bool CanMakeChild(NodeData childData)
 {
     return this.CanMakeChild (childData.nodeType);
 }
コード例 #3
0
ファイル: NewCategory.cs プロジェクト: skyronic/TFAddin
 public NewCategory(NodeData _providerNode)
     : base(Gtk.WindowType.Toplevel)
 {
     providerNode = _providerNode;
     this.Build ();
 }
コード例 #4
0
 public override void OnNodeDataChanged(NodeData source, NodeDataChangedEventArgs args)
 {
     if (source is CategoryData) {
         // get the tree builder
         ITreeBuilder treeBuilder = Context.GetTreeBuilder (source);
         treeBuilder.UpdateAll ();
     }
 }
コード例 #5
0
ファイル: ProviderFrontend.cs プロジェクト: skyronic/TFAddin
 /// <summary>
 /// Used to nest categories.
 /// 
 /// TODO: Migrate createnewcategory to use this function instead
 /// </summary>
 /// <param name="parent">
 /// A <see cref="NodeData"/>
 /// </param>
 public void AddChildCategory(NodeData parent)
 {
     NewCategory n = new NewCategory (parent);
     log.INFO ("Making new category with parent - " + parent.Label);
     n.ShowAll ();
 }
コード例 #6
0
        public virtual void AddChild(NodeData childData)
        {
            // Check if this node can have this as a child
            if(CanMakeChild(childData))
            {
                // First, remove the child from it's parent list
                childData.parent.children.Remove(childData);

                // set the child data's parent to the current object
                childData.parent = this;

                // add the child data as a child
                this.children.Add(childData);

                // Inform both classes about the updates
            }
        }
コード例 #7
0
 public override bool CanMakeChild(NodeData childData);
コード例 #8
0
ファイル: NodeData.cs プロジェクト: skyronic/TFAddin
 public abstract bool CanMakeChild(NodeData childData);
コード例 #9
0
ファイル: NodeData.cs プロジェクト: skyronic/TFAddin
        /// <summary>
        /// Adds a child and does not update GUI. to be used when heavy
        /// tree activity is taking place 
        /// 
        /// YOU HAVE TO CALL TriggerUpdate after finishing tree opeartions
        /// </summary>
        /// <param name="childData">
        /// A <see cref="NodeData"/>
        /// </param>
        public virtual void AddChildSilent(NodeData childData)
        {
            // Check if this node can have this as a child
            if (CanMakeChild (childData)) {
                // First, remove the child from it's parent list
                NodeData oldParent = childData.parent;

                if (oldParent != null)
                    childData.parent.children.Remove (childData);

                // set the child data's parent to the current object
                childData.parent = this;

                // add the child data as a child
                this.children.Add (childData);

                // Inform both classes about the updates
                //this.TriggerUpdate();

            }
        }