Ejemplo n.º 1
0
        public IVisio.Page Resolve(VisioScripting.Client client)
        {
            if (this.Page == null)
            {
                var cmdtarget = client.GetCommandTargetPage();
                this.Page = cmdtarget.ActivePage;
            }

            if (this.Page == null)
            {
                throw new VisioOperationException("Unvalid State No Pages");
            }

            return(this.Page);
        }
Ejemplo n.º 2
0
        public TargetPage Resolve(VisioScripting.Client client)
        {
            if (!this.IsResolved)
            {
                var cmdtarget = client.GetCommandTargetPage();

                // It doesn't matter if there is an active page or not
                // at this point it is considered resolved
                return(new TargetPage(cmdtarget.ActivePage, true));
            }
            else
            {
                return(this);
            }
        }
Ejemplo n.º 3
0
        public TargetPages Resolve(VisioScripting.Client client)
        {
            // Handle the case where the object is already resolved
            if (this._items != null)
            {
                return(this);
            }

            // Otherwise perform resolution
            // Try to use the active page as the default target for the operation

            var cmdtarget = client.GetCommandTargetPage();

            if (cmdtarget.ActivePage == null)
            {
                throw new VisioAutomation.Exceptions.InternalAssertionException();
            }

            return(new TargetPages(cmdtarget.ActivePage));
        }
Ejemplo n.º 4
0
        public IList <IVisio.Page> Resolve(VisioScripting.Client client)
        {
            if (this.Pages == null)
            {
                var cmdtarget = client.GetCommandTargetPage();
                this.Pages = new List <IVisio.Page> {
                    cmdtarget.ActivePage
                };
            }

            if (this.Pages == null)
            {
                throw new VisioOperationException("Unvalid State No Pages");
            }

            if (this.Pages.Count < 1)
            {
                throw new VisioOperationException("Unvalid State No Pages");
            }

            return(this.Pages);
        }