Exemplo n.º 1
0
        public void changeCurrentContent(IContentPage content, bool recordOnHistory = true)
        {
            IContentPage lastContent = currentContent as IContentPage;

            if (lastContent != null)
            {
                lastContent.finalizePage();
            }

            if (lastContent is MyUserControl)
            {
                if (recordOnHistory)
                {
                    history.Push(lastContent as MyUserControl);
                }
            }

            if (content is MyUserControl)
            {
                currentContent = content as MyUserControl;
                currentContent.appear(DockStyle.Fill, mainPanel);

                ContentArgs e = new ContentArgs(content);
                OnContentChange(e);
            }
            content.initializePage();
        }
Exemplo n.º 2
0
        public void changeCurrentContent(IContentPage content)
        {
            IContentPage lastContent = currentContent as IContentPage;

            if (lastContent != null)
            {
                lastContent.finalizePage();
            }

            if (content is MyUserControl)
            {
                currentContent = content as MyUserControl;
                currentContent.appear(DockStyle.Fill, mainPanel);

                ContentArgs e = new ContentArgs(content);
                OnContentChange(e);
            }
            content.initializePage();
        }
Exemplo n.º 3
0
        public void changeCurrentContent(IContentPage content)
        {
            IContentPage lastContent = currentContent as IContentPage;
            if (lastContent != null)
                lastContent.finalizePage();

            if (content is MyUserControl)
            {
                currentContent = content as MyUserControl;
                currentContent.appear(DockStyle.Fill, mainPanel);

                ContentArgs e = new ContentArgs(content);
                OnContentChange(e);
            }
            content.initializePage();
        }