Пример #1
0
        //Group shapes
        private void btnGroup_Click(object sender, EventArgs e)
        {
            UncheckButton();
            if (shapes.Count(shape => shape.isSelect) > 1)
            {
                ShapeSet group = new ShapeSet();

                for (int i = 0; i < shapes.Count; i++)
                {
                    if (shapes[i].isSelect)
                    {
                        group.Add(shapes[i]);
                        shapes.RemoveAt(i);
                        i--;
                    }
                }

                FindGroupRegion(group);
                shapes.Add(group);
                group.isSelect = true;
                pnlPaint.Invalidate();
            }
        }
Пример #2
0
 public virtual void AddShape(IShape shape)
 {
     _shapes.Add((Shape)shape, ((Shape)shape).AddPackage);
 }
Пример #3
0
 public virtual void AddShape(IShape shape)
 {
     _shapes.Add((Shape)shape, ((Shape)shape).AddUnitGroup);
 }
Пример #4
0
 public virtual void AddShape(IShape shape)
 {
     _shapes.Add((Shape)shape, ((Shape)shape).AddRoute);
 }