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();
        }
Exemple #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();
        }
        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();
        }