Exemplo n.º 1
0
        public TargetPage ResolveToPage(Client client)
        {
            if (this.Resolved)
            {
                return(this);
            }

            var cmdtarget = client.GetCommandTarget(CommandTargetFlags.RequirePage);

            client.Output.WriteVerbose("Resolving to active page (name={0})", cmdtarget.ActivePage.Name);

            return(new TargetPage(cmdtarget.ActivePage));
        }
        public TargetSelection ResolveToSelection(Client client)
        {
            if (this.Resolved)
            {
                return(this);
            }

            var cmdtarget = client.GetCommandTarget(CommandTargetFlags.RequirePage);
            var app       = cmdtarget.Application;
            var window    = app.ActiveWindow;
            var selection = window.Selection;

            client.Output.WriteVerbose("Resolving to selection (numshapes={0}) from active window (caption=\"{1}\")", selection.Count, window.Caption);

            return(new TargetSelection(selection));
        }