コード例 #1
0
        /// <summary>
        ///		Añade un nodo a un treeView
        /// </summary>
        public TreeNode AddNode(TreeNode trnParent, TreeNodeKey objNodeKey, string strText,
                                bool blnWithChilds, int intImageIndex, Color clrNode, bool blnBold)
        {
            TreeNode trnNode;

            // Añade el nodo al árbol
            if (trnParent == null)
            {
                trnNode = Nodes.Add(objNodeKey.ID.ToString(), strText, intImageIndex, intImageIndex);
            }
            else
            {
                trnNode = trnParent.Nodes.Add(objNodeKey.ID.ToString(), strText, intImageIndex, intImageIndex);
            }
            // Asigna las claves
            trnNode.Tag = objNodeKey;
            // Cambia la fuente del nodo
            if (blnBold)
            {
                trnNode.NodeFont = new Font(this.Font, FontStyle.Bold);
            }
            // Cambia el color del nodo
            if (clrNode != Color.Transparent)
            {
                trnNode.ForeColor = clrNode;
            }
            // Si puede tener hijos le añade un nodo vacío
            if (blnWithChilds)
            {
                trnNode.Nodes.Add(cnstStrTextEmptyChild);
            }
            // Devuelve el nodo
            return(trnNode);
        }
コード例 #2
0
		/// <summary>
		///		Añade un nodo a un treeView
		/// </summary>
		public TreeNode AddNode(TreeNode trnParent, TreeNodeKey objNodeKey, string strText,
														bool blnWithChilds, int intImageIndex, Color clrNode)
		{ return AddNode(trnParent, objNodeKey, strText, blnWithChilds, intImageIndex, clrNode, false);
		}
コード例 #3
0
		/// <summary>
		///		Añade un nodo a un treeView
		/// </summary>
		public TreeNode AddNode(TreeNode trnParent, TreeNodeKey objNodeKey, string strText,
														bool blnWithChilds)
		{ return AddNode(trnParent, objNodeKey, strText, blnWithChilds, -1, Color.Transparent, false);
		}
コード例 #4
0
		/// <summary>
		///		Añade un nodo a un treeView
		/// </summary>
		public TreeNode AddNode(TreeNode trnParent, TreeNodeKey objNodeKey, string strText,
														bool blnWithChilds, int intImageIndex, Color clrNode, bool blnBold)
		{ TreeNode trnNode;
		
				// Añade el nodo al árbol
					if (trnParent == null)
						trnNode = Nodes.Add(objNodeKey.ID.ToString(), strText, intImageIndex, intImageIndex);
					else
						trnNode = trnParent.Nodes.Add(objNodeKey.ID.ToString(), strText, intImageIndex, intImageIndex);
				// Asigna las claves
					trnNode.Tag = objNodeKey;
				// Cambia la fuente del nodo
					if (blnBold)
						trnNode.NodeFont = new Font(this.Font, FontStyle.Bold);
				// Cambia el color del nodo
					if (clrNode != Color.Transparent)
						trnNode.ForeColor = clrNode;
				// Si puede tener hijos le añade un nodo vacío
					if (blnWithChilds)
						trnNode.Nodes.Add(cnstStrTextEmptyChild);
				// Devuelve el nodo
					return trnNode;
		}
コード例 #5
0
		public TreeViewExtendedEventArgs(System.Windows.Forms.TreeNode trnNode, TreeNodeKey objTreeNodeKey)
		{ Node = trnNode;
			Keys = objTreeNodeKey;
		}
コード例 #6
0
 public TreeViewExtendedEventArgs(System.Windows.Forms.TreeNode trnNode, TreeNodeKey objTreeNodeKey)
 {
     Node = trnNode;
     Keys = objTreeNodeKey;
 }
コード例 #7
0
 /// <summary>
 ///		Añade un nodo a un treeView
 /// </summary>
 public TreeNode AddNode(TreeNode trnParent, TreeNodeKey objNodeKey, string strText,
                         bool blnWithChilds, int intImageIndex)
 {
     return(AddNode(trnParent, objNodeKey, strText, blnWithChilds, intImageIndex, Color.Transparent, false));
 }