public ModelNode(IElement target) : base(target.Name, ImagesForNodes.GetIconNumber(target, false, false), ImagesForNodes.GetIconNumber(target, false, true)) { this.Target = target; this.DeadEnd = true; this.Nodes.Add("DeadEnd"); }
/// <summary> /// Initializes a new instance of the <see cref="BaseTreeNodeControl{T}"/> class. It is specialized <see cref="System.Windows.Forms.TreeNode"/> /// dedicated to represent all items of the model represented as a tree node. /// </summary> /// <param name="model">The model entity to be represented an the tree node.</param> public BaseTreeNodeControl(TModel model) : base() { ModelEntity = model; Name = model.Text; Text = model.Text; ToolTipText = model.ToolTipText; ImageIndex = ImagesForNodes.SetIconIndexForNodeAndSelectedNode(ModelEntity.GetType().Name, false); SelectedImageIndex = ImagesForNodes.SetIconIndexForNodeAndSelectedNode(ModelEntity.GetType().Name, true); model.TextChanged += new EventHandler <BaseTreeNode.TextEventArgs>(OnTextChanged); model.SubtreeChanged += new EventHandler <BaseTreeNode.ProjectEventArgs>(OnSubtreeChanged); AddChildren(); }
internal Reference(string name) : base(name, ImagesForNodes.GetIconNumber(null, true, false), ImagesForNodes.GetIconNumber(null, true, true)) { this.Expand(); }