/// <summary> /// 重载转化成字符串的函数,调试时可以很方便地显示对象信息。 /// </summary> public override string ToString() { ViType type = this.Type as ViType; if (type == null) { return(this.Name); } return(string.Format("{0} : {1}", this.Name, type.Name)); }
/// <summary> /// 构建指定名称的对象。 /// </summary> /// <param name="name">对象名称</param> /// <param name="type">对象类型</param> public UnsortTreeObject(string name, ViType type) : base(name, type) { }
/// <summary> /// 构建指定名称、类型的对象。 /// </summary> /// <param name="name">对象名称</param> /// <param name="type">对象类型</param> public ViNamedObject(string name, ViType type) : this(name) { this.Type = type; }
/// <summary> /// 构建指定名称的对象。 /// </summary> /// <param name="name">对象名称</param> /// <param name="type">对象类型</param> public ViType(string name, ViType type) : base(name, type) { }
/// <summary> /// 构建指定名称的对象。 /// </summary> /// <param name="name">对象名称</param> /// <param name="type">对象类型</param> public SortedTreeObject(string name, ViType type) : base(name, type) { this.Owner = this; this.Children = new ViObservableDictionary <ViNamedObject>(); }
/// <summary> /// 构建指定名称的对象。 /// </summary> /// <param name="name">对象名称</param> /// <param name="type">对象类型</param> public MappedTreeObject(string name, ViType type) : base(name, type) { this.Children.CollectionChanged += Children_CollectionChanged; }