예제 #1
0
        /// <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));
        }
예제 #2
0
 /// <summary>
 /// 构建指定名称的对象。
 /// </summary>
 /// <param name="name">对象名称</param>
 /// <param name="type">对象类型</param>
 public UnsortTreeObject(string name, ViType type)
     : base(name, type)
 {
 }
예제 #3
0
 /// <summary>
 /// 构建指定名称、类型的对象。
 /// </summary>
 /// <param name="name">对象名称</param>
 /// <param name="type">对象类型</param>
 public ViNamedObject(string name, ViType type)
     : this(name)
 {
     this.Type = type;
 }
예제 #4
0
 /// <summary>
 /// 构建指定名称的对象。
 /// </summary>
 /// <param name="name">对象名称</param>
 /// <param name="type">对象类型</param>
 public ViType(string name, ViType type)
     : base(name, type)
 {
 }
예제 #5
0
 /// <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>();
 }
예제 #6
0
 /// <summary>
 /// 构建指定名称的对象。
 /// </summary>
 /// <param name="name">对象名称</param>
 /// <param name="type">对象类型</param>
 public MappedTreeObject(string name, ViType type)
     : base(name, type)
 {
     this.Children.CollectionChanged += Children_CollectionChanged;
 }