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); }
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); }