public void SnapSize(TargetShapes targets, Drawing.Size snapsize, Drawing.Size minsize) { this._client.Application.AssertApplicationAvailable(); this._client.Document.AssertDocumentAvailable(); var shapes = targets.ResolveShapes2D(this._client); if (shapes.Shapes.Count < 1) { return; } var application = this._client.Application.Get(); var page = application.ActivePage; var target_ids = targets.ToShapeIDs(); using (var undoscope = this._client.Application.NewUndoScope("Snap Shape Size")) { ArrangeHelper.SnapSize(page, target_ids, snapsize, minsize); } }
public void SnapSize(IList <IVisio.Shape> target_shapes, Drawing.Size snapsize, Drawing.Size minsize) { this.Client.Application.AssertApplicationAvailable(); this.Client.Document.AssertDocumentAvailable(); var shapes = this.GetTargetShapes2D(target_shapes); if (shapes.Count < 1) { return; } var shapeids = shapes.Select(s => s.ID).ToList(); var application = this.Client.Application.Get(); using (var undoscope = this.Client.Application.NewUndoScope("SnapSize")) { var active_page = application.ActivePage; ArrangeHelper.SnapSize(active_page, shapeids, snapsize, minsize); } }