Exemple #1
0
        private void AddPage(MozItem item, PropertyPage page)
        {
            PageProp _pageProp = new PageProp();

            _pageProp.Page    = page;
            _pageProp.MozItem = item;

            mozPane.Items.Add(item);

            m_pages.Add(item.Name, _pageProp);
        }
Exemple #2
0
        public void Init()
        {
            foreach (PageProp _pageProp in m_pages.Values)
            {
                PropertyPage _page = _pageProp.Page;

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

            if (m_pages.Count != 0)
            {
                ActivatePage(mozPane.Items[0]);
            }
        }
Exemple #3
0
        private bool ActivatePage(MozItem item)
        {
            if (!m_pages.ContainsKey(item.Name))
            {
                return(false);
            }

            PageProp _pageProp = m_pages[item.Name];

            PropertyPage _page = _pageProp.Page;

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

            m_activePage = _page;

            if (m_activePage != null)
            {
                mozPane.SelectByName(item.Name);

                m_activePage.Visible = true;

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

                    _page.IsInit = true;
                }

                m_activePage.OnSetActive();
            }

            return(true);
        }
Exemple #4
0
 public void AddPage(string text, int imageIndex, PropertyPage page)
 {
     AddPage(GetMozItem(text, imageIndex), page);
 }
Exemple #5
0
 public void AddPage(string text, PropertyPage page)
 {
     AddPage(GetMozItem(text), page);
 }