/// <summary> /// Performs changes for undo and redo. /// </summary> /// <seealso cref="M:Northwoods.Go.GoObject.ChangeValue(Northwoods.Go.GoChangedEventArgs,System.Boolean)" /> public override void ChangeValue(GoChangedEventArgs e, bool undo) { switch (e.SubHint) { case 1001: { base.ChangeValue(e, undo); RectangleF rect = e.GetRect(!undo); RectangleF rect2 = e.GetRect(undo); if (rect.Width == rect2.Width && rect.Height == rect2.Height) { float dx = rect2.X - rect.X; float dy = rect2.Y - rect.Y; GoStroke.TranslatePoints(myPoints, dx, dy); } break; } case 1460: A = e.GetPoint(undo); break; case 1461: B = e.GetPoint(undo); break; case 1462: C = e.GetPoint(undo); break; case 1463: D = e.GetPoint(undo); break; case 1464: { PointF[] array = (PointF[])e.GetValue(undo); if (array != null) { SetPoints(array); } break; } case 1465: Orientation = (Orientation)e.GetValue(undo); break; default: base.ChangeValue(e, undo); break; } }
/// <summary> /// Performs changes for undo and redo. /// </summary> /// <seealso cref="M:Northwoods.Go.GoObject.ChangeValue(Northwoods.Go.GoChangedEventArgs,System.Boolean)" /> public override void ChangeValue(GoChangedEventArgs e, bool undo) { switch (e.SubHint) { case 1001: { base.ChangeValue(e, undo); RectangleF rect = e.GetRect(!undo); RectangleF rect2 = e.GetRect(undo); if (rect.Width == rect2.Width && rect.Height == rect2.Height) { float dx = rect2.X - rect.X; float dy = rect2.Y - rect.Y; GoStroke.TranslatePoints(myPoints, dx, dy); } break; } case 1431: A = e.GetPoint(undo); break; case 1432: B = e.GetPoint(undo); break; case 1433: C = e.GetPoint(undo); break; case 1434: { PointF[] array = (PointF[])e.GetValue(undo); if (array != null) { ResetPath(); myPoints = array; } break; } default: base.ChangeValue(e, undo); break; } }