public TargetDocument Resolve(VisioScripting.Client client) { if (this.IsResolved) { return(this); } var command_target = new CommandTarget(client, CommandTargetRequirementFlags.RequireApplication | CommandTargetRequirementFlags.RequireActiveDocument | CommandTargetRequirementFlags.RequirePage); return(new TargetDocument(command_target.ActiveDocument)); }
public TargetDocument ResolveToDocument(VisioScripting.Client client) { if (this.Resolved) { return(this); } var flags = CommandTargetFlags.RequireApplication | CommandTargetFlags.RequireDocument | CommandTargetFlags.RequirePage; var command_target = new CommandTarget(client, flags); client.Output.WriteVerbose("Resolving to active document (name={0})", command_target.ActiveDocument.Name); return(new TargetDocument(command_target.ActiveDocument)); }
public TargetDocuments ResolveToDocuments(VisioScripting.Client client) { if (this.Resolved) { return(this); } // Handle the unresolved case var flags = CommandTargetFlags.RequireApplication | CommandTargetFlags.RequireDocument | CommandTargetFlags.RequirePage; var cmdtarget = new CommandTarget(client, flags); var docs = new List <IVisio.Document> { cmdtarget.ActiveDocument }; client.Output.WriteVerbose("Resolving to active document (name={0})", cmdtarget.ActiveDocument.Name); return(new TargetDocuments(docs)); }
public CommandTarget GetCommandTarget(CommandTargetFlags flags) { var ct = new CommandTarget(this, flags); return(ct); }