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