public void AddTab_basic() { // Add a tab SBTabProperties tabProps = new SBTabProperties(); tabProps.Name = "tabname"; tabProps.Text = "tabtext"; tabProps.Message = "SideBarTabClicked"; tabProps.ConfigureMessage = "SideBarConfigure"; tabProps.ConfigureMenuText = "cfgText"; tabProps.InfoBarButtonToolTipFormat = "fmttooltip"; m_sibAdapter.AddTab(tabProps); }
/// <summary> /// Setup the sidebar/info. bar adapter. - from TeMainWnd.cs /// </summary> private void SetupSideBarInfoBar() { // Null when running tests. if (SIBAdapter == null) { return; } SIBAdapter.ItemImageListLarge = TeResourceHelper.TeSideBarLargeImages; SIBAdapter.ItemImageListSmall = TeResourceHelper.TeSideBarSmallImages; SIBAdapter.TabImageList = TeResourceHelper.TeSideBarTabImages; SIBAdapter.LargeIconModeImageIndex = 4; SIBAdapter.SmallIconModeImageIndex = 5; string cfgMsg = "SideBarConfigure"; string cfgText = TeResourceHelper.GetResourceString("kstidSideBarConfigureItem"); string fmttooltip = TeResourceHelper.GetResourceString("kstidInfoBarButtonTooltipFormat"); // Add the scripture tab. SBTabProperties tabProps = new SBTabProperties(); tabProps.Name = kScrSBTabName; tabProps.Text = TeResourceHelper.GetResourceString("kstidScriptureTask"); tabProps.Message = "SideBarTabClicked"; tabProps.ConfigureMessage = cfgMsg; tabProps.ConfigureMenuText = cfgText; tabProps.InfoBarButtonToolTipFormat = fmttooltip; tabProps.ImageIndex = 0; SIBAdapter.AddTab(tabProps); // Add the back translation tab. tabProps = new SBTabProperties(); tabProps.Name = kBTSBTabName; tabProps.Text = TeResourceHelper.GetResourceString("kstidBackTransTask"); tabProps.Message = "SideBarTabClicked"; tabProps.ConfigureMessage = cfgMsg; tabProps.ConfigureMenuText = cfgText; tabProps.InfoBarButtonToolTipFormat = fmttooltip; tabProps.ImageIndex = 1; SIBAdapter.AddTab(tabProps); // Add the checking tab. tabProps = new SBTabProperties(); tabProps.Name = kChkSBTabName; tabProps.Text = TeResourceHelper.GetResourceString("kstidCheckingTask"); tabProps.Message = "SideBarTabClicked"; tabProps.ConfigureMessage = cfgMsg; tabProps.ConfigureMenuText = cfgText; tabProps.InfoBarButtonToolTipFormat = fmttooltip; tabProps.ImageIndex = 2; SIBAdapter.AddTab(tabProps); // Add the publications tab. tabProps = new SBTabProperties(); tabProps.Name = kPubSBTabName; tabProps.Text = TeResourceHelper.GetResourceString("kstidPublicationsTask"); tabProps.Message = "SideBarTabClicked"; tabProps.ConfigureMessage = cfgMsg; tabProps.ConfigureMenuText = cfgText; tabProps.InfoBarButtonToolTipFormat = fmttooltip; tabProps.Enabled = false; tabProps.ImageIndex = 3; SIBAdapter.AddTab(tabProps); }