示例#1
0
 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");
 }
示例#2
0
 /// <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();
 }
示例#3
0
 internal Reference(string name)
     : base(name, ImagesForNodes.GetIconNumber(null, true, false), ImagesForNodes.GetIconNumber(null, true, true))
 {
     this.Expand();
 }