protected virtual void OnResize(ResizeEventArgs e) { if (Resize != null) { Resize(this, e); } }
private void PerformResize(SizeF mouseOffset) { SizeF sizeChange = SizeF.Empty; SizeF positionChange = SizeF.Empty; if ((resizeMode & ResizeMode.Right) != 0) { sizeChange.Width += mouseOffset.Width; } else if ((resizeMode & ResizeMode.Left) != 0) { positionChange.Width += mouseOffset.Width; sizeChange.Width -= mouseOffset.Width; } if ((resizeMode & ResizeMode.Bottom) != 0) { sizeChange.Height += mouseOffset.Height; } else if ((resizeMode & ResizeMode.Top) != 0) { positionChange.Height += mouseOffset.Height; sizeChange.Height -= mouseOffset.Height; } ResizeEventArgs e = new ResizeEventArgs(positionChange, sizeChange); OnResizing(e); Size += e.SizeChange.ToSize(); Location += e.PositionChange.ToSize(); }
protected void ChildResized(object sender, ResizeEventArgs e) { var shape = (Shape)sender; if (shape.ParentShape != this) { return; } UpdateSize(); UpdateMinSize(); }
protected override void OnResize(ResizeEventArgs e) { base.OnResize(e); if (editorShowed) { editor.Relocate(this); if (!editor.Focused) { editor.Focus(); } } }
protected override void OnResize(ResizeEventArgs e) { base.OnResize(e); if (editorShowed) { editor.Relocate(this); if (!editor.Focused) editor.Focus(); } }
protected virtual void OnResize(ResizeEventArgs e) { if (Resize != null) Resize(this, e); }
private void PerformResize(PointF mouseLocation) { Size change = Size.Empty; if ((resizeMode & ResizeMode.Right) != 0) { int offset = (int) (mouseLocation.X - mouseDownLocation.X); change.Width += offset; } if ((resizeMode & ResizeMode.Bottom) != 0) { int offset = (int) (mouseLocation.Y - mouseDownLocation.Y); change.Height += offset; } ResizeEventArgs e = new ResizeEventArgs(change); OnResizing(e); Size += e.Change; }
private void EndShapeResizing(object sender, ResizeEventArgs e) { foreach (BendPoint bendPoint in bendPoints.GetReversedList()) { if (bendPoint.RelativeToStartShape) break; bendPoint.ShapeResized(e.Change); } Reroute(); OnRouteChanged(EventArgs.Empty); OnModified(EventArgs.Empty); }
protected virtual void OnResize(ResizeEventArgs e) { Resize?.Invoke(this, e); }