Ejemplo n.º 1
0
        /// <summary>
        /// only for XML serialize or deserialize use
        /// </summary>
        public override void AddNewShape(Rectangle newRect)
        {
            if (newRect.Width > 20 && newRect.Height > 10)
            {
                AreaShape shape = new AreaShape(newRect, base.GetShapeCount());

                base.AddShape(shape);
            }
            parent.Invalidate();
        }
Ejemplo n.º 2
0
        public override ArrayList CheckSelectedShape(MouseEventArgs ex)
        {
            ArrayList ret = new ArrayList();

            foreach (BaseShape shape in base.GetShapeList())
            {
                if (shape is AreaShape)
                {
                    AreaShape area = shape as AreaShape;
                    if (area.TextField.Boundary.Contains(ex.Location))
                    {
                        ret.Add(area.TextField);
                        break;
                    }
                }
                if (shape.Boundary.Contains(ex.Location))
                {
                    ret.Add(shape);
                    break;
                }
            }
            return(ret);
        }