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); }
public void Last(object sender, EventArgs e) { IDrawObj obj = _selectedObjs[0]; Objs.Remove(obj); Objs.Insert(0, obj); obj.Invalidate(); }
public void Top(object sender, EventArgs e) { IDrawObj obj = _selectedObjs[0]; Objs.Remove(obj); Objs.Add(obj); obj.Invalidate(); }
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); }
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(); } }
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(); } }
public virtual void ObjectCanSelectChanged(IDrawObj obj) { obj.Invalidate(); }