コード例 #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);
        }
コード例 #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;
            }
        }
コード例 #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();
            }
        }
コード例 #4
0
 internal PageHost(PagedComponentContainer <TPage> container, ContainerPage page)
     : base(container, page.Component)
 {
 }
コード例 #5
0
        /// <summary>
        /// Gets the view for the specified page.
        /// </summary>
        public IApplicationComponentView GetPageView(ContainerPage page)
        {
            PageHost host = _mapPageToHost[page];

            return(host.ComponentView);
        }