Ejemplo n.º 1
0
        private IList <IVisio.Shape> __ResolveShapes(VisioScripting.Client client)
        {
            client.Application.AssertApplicationAvailable();

            if (this.Shapes == null)
            {
                var out_shapes = client.Selection.GetShapes();
                client.WriteVerbose("GetTargetShapes: Returning {0} shapes from the active selection", out_shapes.Count);
                return(out_shapes);
            }

            client.WriteVerbose("GetTargetShapes: Returning {0} shapes that were passed in", this.Shapes.Count);
            return(this.Shapes);
        }
Ejemplo n.º 2
0
        internal int SetSelectionGetSelectedCount(VisioScripting.Client client)
        {
            client.Application.AssertApplicationAvailable();

            if (this.Shapes == null)
            {
                int n = client.Selection.Count();
                client.WriteVerbose("GetTargetSelectionCount: Using active selection of {0} shapes", n);
                return(n);
            }

            client.WriteVerbose("GetTargetSelectionCount: Reseting selecton to specified {0} shapes", this.Shapes.Count);
            client.Selection.SelectNone();
            client.Selection.Select(this.Shapes);
            int selected_count = client.Selection.Count();

            return(selected_count);
        }