public void DistributeSelectionOnAxis(Models.TargetShapes targets, Models.Axis axis, double spacing)
        {
            var cmdtarget = this._client.GetCommandTargetPage();

            var page = cmdtarget.ActivePage;

            targets = targets.ResolveShapes(this._client);
            var targetids = targets.ToShapeIDs();

            using (var undoscope = this._client.Undo.NewUndoScope(nameof(DistributeSelectionOnAxis)))
            {
                VisioScripting.Helpers.ArrangeHelper.DistributeWithSpacing(page, targetids, axis, spacing);
            }
        }
예제 #2
0
        internal void __SetCells(Models.TargetShapes targets, VASS.CellGroups.CellGroup cells, IVisio.Page page)
        {
            targets = targets.ResolveShapes(this._client);
            var shapeids = targets.ToShapeIDs();
            var writer   = new VASS.Writers.SidSrcWriter();

            foreach (var shapeid in shapeids.ShapeIDs)
            {
                if (cells is VASS.CellGroups.CellGroup)
                {
                    var cells_mr = (VASS.CellGroups.CellGroup)cells;
                    writer.SetValues((short)shapeid, cells_mr, 0);
                }
                else
                {
                    var cells_sr = (VASS.CellGroups.CellGroup)cells;
                    writer.SetValues((short)shapeid, cells_sr);
                }
            }

            writer.CommitFormulas(page);
        }
예제 #3
0
        public void SetLockCells(Models.TargetShapes targets, LockCells lockcells)
        {
            var cmdtarget = this._client.GetCommandTargetPage();

            targets = targets.ResolveShapes(this._client);
            if (targets.Shapes.Count < 1)
            {
                return;
            }

            var page            = cmdtarget.ActivePage;
            var target_shapeids = targets.ToShapeIDs();
            var writer          = new VASS.Writers.SidSrcWriter();

            foreach (int shapeid in target_shapeids.ShapeIDs)
            {
                writer.SetValues((short)shapeid, lockcells);
            }

            using (var undoscope = this._client.Undo.NewUndoScope(nameof(SetLockCells)))
            {
                writer.CommitFormulas(page);
            }
        }