private void AddPage(Pabo.MozBar.MozItem item, PropertyPage page) { PageProp pageProp = new PageProp(); pageProp.Page = page; pageProp.MozItem = item; this.mozPane1.Items.Add(item); this.pages.Add(item.Name, pageProp); }
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 (this.pages.Count != 0) { ActivatePage(this.mozPane1.Items[0]); } }
private bool ActivatePage(Pabo.MozBar.MozItem item) { if (!this.pages.ContainsKey(item.Name)) { return(false); } PageProp pageProp = this.pages[item.Name]; PropertyPage page = pageProp.Page; if (activePage != null) { activePage.Visible = false; } activePage = page; if (activePage != null) { this.mozPane1.SelectByName(item.Name); activePage.Visible = true; if (!page.IsInit) { page.OnInit(); page.IsInit = true; } activePage.OnSetActive(); } return(true); }
private bool ActivatePage(Pabo.MozBar.MozItem item) { if (!this.pages.ContainsKey(item.Name)) { return false; } PageProp pageProp = this.pages[item.Name]; PropertyPage page = pageProp.Page; if (activePage != null) { activePage.Visible = false; } activePage = page; if (activePage != null) { this.mozPane1.SelectByName(item.Name); activePage.Visible = true; if (!page.IsInit) { page.OnInit(); page.IsInit = true; } activePage.OnSetActive(); } return true; }
public void AddPage(string text, int imageIndex, PropertyPage page) { this.AddPage(this.GetMozItem(text, imageIndex), page); }
public void AddPage(string text, PropertyPage page) { this.AddPage(this.GetMozItem(text), page); }