示例#1
0
        private void AddPage(MozItem item, PropertyPage page)
        {
            var pageProp = new PageProp();

            pageProp.Page = page;
            pageProp.MozItem = item;

            mozPane1.Items.Add(item);

            pages.Add(item.Name, pageProp);
        }
示例#2
0
        private void AddPage(MozItem item, PropertyPage page)
        {
            var pageProp = new PageProp();

            pageProp.Page    = page;
            pageProp.MozItem = item;

            mozPane1.Items.Add(item);

            pages.Add(item.Name, pageProp);
        }
示例#3
0
        public void Init()
        {
            foreach (PageProp pageProp in pages.Values)
            {
                PropertyPage page = pageProp.Page;

                pagePanel.Controls.Add(page);
                page.Dock    = DockStyle.Fill;
                page.Visible = false;
            }

            if (pages.Count != 0)
            {
                ActivatePage(mozPane1.Items[0]);
            }
        }
示例#4
0
        private bool ActivatePage(MozItem item)
        {
            if (!pages.ContainsKey(item.Name))
            {
                return false;
            }

            PageProp pageProp = pages[item.Name];

            PropertyPage page = pageProp.Page;

            if (activePage != null)
            {
                activePage.Visible = false;
            }

            activePage = page;

            if (activePage != null)
            {
                mozPane1.SelectByName(item.Name);

                activePage.Visible = true;

                if (!page.IsInit)
                {
                    page.OnInit();

                    page.IsInit = true;
                }

                activePage.OnSetActive();
            }

            return true;
        }
示例#5
0
        private bool ActivatePage(MozItem item)
        {
            if (!pages.ContainsKey(item.Name))
            {
                return(false);
            }

            PageProp pageProp = pages[item.Name];

            PropertyPage page = pageProp.Page;

            if (activePage != null)
            {
                activePage.Visible = false;
            }

            activePage = page;

            if (activePage != null)
            {
                mozPane1.SelectByName(item.Name);

                activePage.Visible = true;

                if (!page.IsInit)
                {
                    page.OnInit();

                    page.IsInit = true;
                }

                activePage.OnSetActive();
            }

            return(true);
        }
示例#6
0
 public void AddPage(string text, int imageIndex, PropertyPage page)
 {
     AddPage(GetMozItem(text, imageIndex), page);
 }
示例#7
0
 public void AddPage(string text, PropertyPage page)
 {
     AddPage(GetMozItem(text), page);
 }
示例#8
0
 public void AddPage(string text, int imageIndex, PropertyPage page)
 {
     AddPage(GetMozItem(text, imageIndex), page);
 }
示例#9
0
 public void AddPage(string text, PropertyPage page)
 {
     AddPage(GetMozItem(text), page);
 }