예제 #1
0
 /// <summary>
 /// 指定当前的目标图形
 /// </summary>
 /// <param name="shape"></param>
 public void SetIntersectGeometry(IntersectGeometry shape)
 {
     if (shape.GeometryShape != null && shape.IntersectPoint.Line != null)
     {
         if (this.tagert == null)
         {
             if (this.Filter != null)
             {
                 //判断是不是过滤的对象
                 if (this.Filter.AllowElement(shape.GeometryShape))
                 {
                     this.tagert     = shape.GeometryShape;
                     this.targetLine = shape.IntersectPoint.Line;
                     TipMessage      = "请选择参照边";
                 }
             }
         }
         else
         {
             this.referShape = shape.GeometryShape;
             this.referLine  = shape.IntersectPoint.Line;
             this.Complete();
         }
     }
 }
예제 #2
0
 /// <summary>
 /// 对当前进行选择,当前函数,是元素边界选择,非中心选择,元素的图形选择,交给外部实现
 /// </summary>
 /// <param name="v"></param>
 /// <returns></returns>
 public virtual IntersectGeometry Select(Vector2D v = null)
 {
     if (IsEnabled)
     {
         IntersectPoint ip = null;
         ip = IntersectPoint(v);
         if (ip != null)
         {
             IntersectGeometry ig = new IntersectGeometry();
             ig.GeometryShape  = this;
             ig.IntersectPoint = ip;
             SelectedEventArgs gea = new SelectedEventArgs(ig);
             if (Selected != null)
             {
                 Selected(gea);
             }
             this.DashStyle = new DashStyle(new double[] { 3, 3 }, 0);
             this.Update();
             return(ig);
         }
         else
         {
             return(null);
         }
     }
     return(null);
 }
예제 #3
0
 /// <summary>
 /// 指定一个偏移的图形元素
 /// </summary>
 /// <param name="shape"></param>
 public void SetIntersectGeometry(IntersectGeometry shape)
 {
     if (this.Filter != null)
     {
         //判断是不是过滤的对象
         if (this.Filter.AllowElement(shape.GeometryShape))
         {
             this.tagert = shape.GeometryShape;
         }
     }
 }
예제 #4
0
        /// <summary>
        /// 设置当前相交信息
        /// </summary>
        /// <param name="shape"></param>
        public void SetIntersectGeometry(IntersectGeometry shape)
        {
            if (this.Filter != null)
            {
                //判断是不是过滤的对象
                if (this.Filter.AllowElement(shape.GeometryShape))
                {
                    this.tagert = shape.GeometryShape;
                    this.tagert.Revserse();
                    this.tagert.Update();

                    this.Complete();
                }
            }
        }
예제 #5
0
 /// <summary>
 /// 当前的图形事件对象
 /// </summary>
 /// <param name="igs"></param>
 public SelectedEventArgs(IntersectGeometry ig)
 {
     interestGeometry = ig;
 }
예제 #6
0
 /// <summary>
 /// 设置当前相交信息
 /// </summary>
 /// <param name="shape"></param>
 public void SetIntersectGeometry(IntersectGeometry shape)
 {
     this.CommandMessage = "选择移动的起点";
     this.tagert         = shape.GeometryShape;
 }
예제 #7
0
 /// <summary>
 /// 设置当前的目标图形
 /// </summary>
 /// <param name="shape"></param>
 public void SetIntersectGeometry(IntersectGeometry shape)
 {
     this.tagert = shape.GeometryShape;
 }
예제 #8
0
 /// <summary>
 /// 当前的图形Pick事件对象
 /// </summary>
 /// <param name="igs"></param>
 public PickedEventArgs(IntersectGeometry ig)
 {
     interestGeometry = ig;
 }
예제 #9
0
 /// <summary>
 /// 构造函数,初始化当前的图形选择类
 /// </summary>
 /// <param name="ig"></param>
 public PickedGeometry(IntersectGeometry ig)
 {
     IntersectGeometry = ig;
 }
예제 #10
0
 /// <summary>
 /// 构造函数,初始化当前的图形选择类
 /// </summary>
 /// <param name="ig"></param>
 public SelectedGeometry(IntersectGeometry ig)
 {
     IntersectGeometry = ig;
 }