Example #1
0
        public bool MouseUp(MouseButtons button, PointF location, PointF revertPoint, PointF revertDownPoint)
        {
            if (_studio.IsGrid)
            {
                revertPoint     = Tool.GetGridPointF(revertPoint);
                revertDownPoint = Tool.GetGridPointF(revertDownPoint);
            }

            if (_state != CreateState.NotCreate)
            {
                if (!_isNodeCreate)
                {
                    if (_state == CreateState.HasCreate)
                    {
                        revertPoint = GetOrthoSquarePoint(revertDownPoint, revertPoint);
                        _studio.DrawFrame(PointF.Empty, PointF.Empty, FrameStyle.Thick, true);

                        IDrawObj obj = _studio.StudioCreateDrawObj(_type, Tool.GetRectF(revertDownPoint, revertPoint));
                        if (obj != null)
                        {
                            obj.Invalidate();
                        }
                        End();
                        _studio.Container.Framework.Manager.ResetToolboxPointerFunction();
                    }
                }

                return(true);
            }

            return(false);
        }
Example #2
0
        public void Last(object sender, EventArgs e)
        {
            IDrawObj obj = _selectedObjs[0];

            Objs.Remove(obj);
            Objs.Insert(0, obj);
            obj.Invalidate();
        }
Example #3
0
        public void Top(object sender, EventArgs e)
        {
            IDrawObj obj = _selectedObjs[0];

            Objs.Remove(obj);
            Objs.Add(obj);
            obj.Invalidate();
        }
Example #4
0
        private IDrawObj CloneDrawObj(IDrawObj origObj)
        {
            IDrawObj newObj = (IDrawObj)origObj.Clone();

            newObj.Parant = Container;
            _nameManager.CreateName(newObj);
            newObj.LoadInitializationEvent();
            Objs.Add(newObj);
            newObj.Invalidate();
            return(newObj);
        }
Example #5
0
        public void Back(object sender, EventArgs e)
        {
            IDrawObj obj   = _selectedObjs[0];
            int      index = Objs.IndexOf(obj);

            if (index > 0)
            {
                Objs.Remove(obj);
                Objs.Insert(index - 1, obj);
                obj.Invalidate();
            }
        }
Example #6
0
        public void Front(object sender, EventArgs e)
        {
            IDrawObj obj   = _selectedObjs[0];
            int      index = Objs.IndexOf(obj);

            if (index != Objs.Count - 1)
            {
                Objs.Remove(obj);
                Objs.Insert(index + 1, obj);
                obj.Invalidate();
            }
        }
Example #7
0
 public virtual void ObjectCanSelectChanged(IDrawObj obj)
 {
     obj.Invalidate();
 }