示例#1
0
        public bool CloseCurrentContent()
        {
            IViewContent content = viewContent;

            if (content != null)
            {
                if (!content.Close())
                {
                    return(false);
                }
                viewContent           = null;
                content.TitleChanged -= OnTitleChanged;
                OnTitleChanged(content, EventArgs.Empty);
                foreach (Control ctl in contentPanel.Controls)
                {
                    ctl.Dispose();
                }
                contentPanel.Controls.Clear();
            }
            return(true);
        }