Exemplo n.º 1
0
 /// <summary>
 /// 拷贝的构造函数。
 /// </summary>
 /// <param name="layer"></param>
 public Layer(Layer layer)
 {
     if (layer == null) throw new ArgumentNullException();
     this.Bounds = new Rectangle2D(layer.Bounds);
     this.Caption = layer.Caption;
     this.Description = layer.Description;
     this.Name = layer.Name;
     this.Queryable = layer.Queryable;
     this.SubLayers = new LayerCollection();
 }
Exemplo n.º 2
0
 /// <summary>
 /// 搜索指定的对象,并返回整个 LayerCollection中第一个匹配项的从零开始的索引。
 /// </summary>
 /// <param name="item">查找的对象。</param>
 /// <returns>查找对象的索引。</returns>
 public int IndexOf(Layer item)
 {
     if (this.Layers != null)
         return Layers.IndexOf(item);
     else
         throw new ArgumentNullException();
 }
Exemplo n.º 3
0
 /// <summary>
 /// 图层集合中是否包含指定的图层。
 /// </summary>
 /// <param name="item">指定的图层对象。</param>
 /// <returns>是否存在包含的图层。</returns>
 public bool Contains(Layer item)
 {
     if (this.Layers != null)
         return Layers.Contains(item);
     else
         throw new ArgumentNullException();
 }
Exemplo n.º 4
0
 /// <summary>
 /// 根据指定的索引将图层对象插入到指定的位置。
 /// </summary>
 /// <param name="index">图层索引。</param>
 /// <param name="item">图层对象。</param>
 public void Insert(int index, Layer item)
 {
     if (this.Layers != null)
         Layers.Insert(index, item);
     else
         throw new ArgumentNullException();
 }
Exemplo n.º 5
0
 /// <summary>
 /// 往图层集中增加一个图层对象。
 /// </summary>
 /// <param name="item">图层对象。</param>
 public void Add(Layer item)
 {
     if (this.Layers != null)
         Layers.Add(item);
     else
         throw new ArgumentNullException();
 }