Ejemplo n.º 1
0
        protected override void ProcessRecord()
        {
            var targetshapes = new VisioScripting.TargetShapes(this.Shape);

            targetshapes.ResolveToSelection(this.Client);

            if (this.NudgeX != 0.0 || this.NudgeY != 0.0)
            {
                this.Client.Arrange.Nudge(VisioScripting.TargetSelection.Auto, this.NudgeX, this.NudgeY);
            }

            if (this.DistributeHorizontal)
            {
                this.Client.Arrange.DistributeOnAxis(VisioScripting.TargetSelection.Auto, VisioScripting.Models.Axis.XAxis);
            }

            if (this.DistributeVertical)
            {
                this.Client.Arrange.DistributeOnAxis(VisioScripting.TargetSelection.Auto, VisioScripting.Models.Axis.YAxis);
            }

            if (this.AlignVertical.HasValue)
            {
                this.Client.Arrange.AlignVertical(VisioScripting.TargetSelection.Auto, this.AlignVertical.Value);
            }

            if (this.AlignHorizontal.HasValue)
            {
                this.Client.Arrange.AlignHorizontal(VisioScripting.TargetSelection.Auto, this.AlignHorizontal.Value);
            }
        }
        protected override void ProcessRecord()
        {
            var targetshapes = new VisioScripting.TargetShapes(this.Shape);

            targetshapes.ResolveToSelection(this.Client);

            string ext = System.IO.Path.GetExtension(this.Filename).ToLowerInvariant();

            if (!System.IO.File.Exists(this.Filename))
            {
                this.WriteVerbose("File already exists");
                if (this.Overwrite)
                {
                    System.IO.File.Delete(this.Filename);
                }
                else
                {
                    string msg = string.Format("File \"{0}\" already exists", this.Filename);
                    var    exc = new System.ArgumentException(msg);
                    throw exc;
                }
            }

            if (_static_html_extensions.Contains(ext))
            {
                this.Client.Export.ExportSelectionToHtml(VisioScripting.TargetSelection.Auto, this.Filename);
            }
            else
            {
                this.Client.Export.ExportSelectionToImage(VisioScripting.TargetSelection.Auto, this.Filename);
            }
        }
Ejemplo n.º 3
0
        protected override void ProcessRecord()
        {
            var targetshapes = new VisioScripting.TargetShapes(this.Shape);

            targetshapes.ResolveToSelection(this.Client);

            this.Client.Selection.DuplicateShapes(VisioScripting.TargetSelection.Auto);
        }
Ejemplo n.º 4
0
        protected override void ProcessRecord()
        {
            var targetshapes = new VisioScripting.TargetShapes(this.Shape);
            targetshapes.ResolveToSelection(this.Client);

            var group = this.Client.Grouping.Group(VisioScripting.TargetSelection.Auto);
            this.WriteObject(group);
        }