Esempio n. 1
0
        /// <summary>
        /// Ensures that the specified component has been started.
        /// </summary>
        public override void EnsureStarted(IApplicationComponent component)
        {
            ContainerPage page = CollectionUtils.SelectFirst <ContainerPage>(_pages,
                                                                             delegate(ContainerPage p) { return(p.Component == component); });

            EnsureStarted(page);
        }
Esempio n. 2
0
        /// <summary>
        /// Ensures that the specified <see cref="ContainerPage"/> is stopped, regardless of whether or not it is visible.
        /// </summary>
        /// <param name="page"></param>
        protected void EnsureStopped(ContainerPage page)
        {
            PageHost host = _mapPageToHost[page];

            if (host.IsStarted)
            {
                host.StopComponent();
                page.Component.ModifiedChanged -= Component_ModifiedChanged;
            }
        }
Esempio n. 3
0
        /// <summary>
        /// Ensures that the specified <see cref="ContainerPage"/> is started, regardless of whether or not it is visible.
        /// </summary>
        protected void EnsureStarted(ContainerPage page)
        {
            PageHost host = _mapPageToHost[page];

            if (!host.IsStarted)
            {
                page.Component.ModifiedChanged += Component_ModifiedChanged;
                host.StartComponent();
            }
        }
Esempio n. 4
0
 internal PageHost(PagedComponentContainer <TPage> container, ContainerPage page)
     : base(container, page.Component)
 {
 }
Esempio n. 5
0
        /// <summary>
        /// Gets the view for the specified page.
        /// </summary>
        public IApplicationComponentView GetPageView(ContainerPage page)
        {
            PageHost host = _mapPageToHost[page];

            return(host.ComponentView);
        }