protected void SelectPage(VerticalTabs.IVerticalTab page) { if (page == null || !verticalTabs.Items.Contains(page)) { return; } verticalTabs.SelectedItem = page; }
protected override string GetTabTitle(VerticalTabs.IVerticalTab verticalTab) { NetworkingPropertiesPage page = verticalTab as NetworkingPropertiesPage; if (page != null) { return(page.type == NetworkingPropertiesPage.Type.SECONDARY ? page.Text : Messages.NETWORKING_PROPERTIES_TAB_TITLE_PRIMARY); } return(base.GetTabTitle(verticalTab)); }
protected override string GetTabTitle(VerticalTabs.IVerticalTab verticalTab) { PvsCacheConfigurationPage page = verticalTab as PvsCacheConfigurationPage; if (page != null) { return(page.Text); } return(base.GetTabTitle(verticalTab)); }
/// <summary> /// When in design mode, auto remove tabs from the list /// </summary> private void ContentPanel_ControlRemoved(object sender, ControlEventArgs e) { if (!DesignMode) { return; } VerticalTabs.IVerticalTab verticalTab = e.Control as VerticalTabs.IVerticalTab; if (verticalTab == null) { return; } verticalTabs.Items.Remove(verticalTab); }
/// <summary> /// When in design mode, auto add tabs to the list /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void ContentPanel_ControlAdded(object sender, ControlEventArgs e) { if (!DesignMode) { return; } VerticalTabs.IVerticalTab verticalTab = e.Control as VerticalTabs.IVerticalTab; if (verticalTab == null) { return; } foreach (VerticalTabs.IVerticalTab vt in verticalTabs.Items) { if (vt == verticalTab) { return; } } verticalTabs.Items.Add(verticalTab); }
private void verticalTabs_SelectedIndexChanged(object sender, EventArgs e) { ListBox listBox = sender as ListBox; if (sender == null) { return; } VerticalTabs.IVerticalTab editPage = listBox.SelectedItem as VerticalTabs.IVerticalTab; if (editPage == null) { return; } Control control = editPage as Control; if (control == null) { return; } TabImage.Image = editPage.Image; TabTitle.Text = GetTabTitle(editPage); control.Show(); control.BringToFront(); foreach (Control other in ContentPanel.Controls) { if (other != control) { other.Hide(); } } }
protected virtual string GetTabTitle(VerticalTabs.IVerticalTab verticalTab) { return(verticalTab != null ? verticalTab.Text : String.Empty); }