Esempio n. 1
0
        /// <summary>
        /// Create a tab on the sidebar from a choice.
        /// </summary>
        protected void MakeAreaButton(ListPropertyChoice choice)
        {
#if USE_DOTNETBAR
            UIItemDisplayProperties display = choice.GetDisplayProperties();
            display.Text = display.Text.Replace("_", "");
            ButtonItem button = new ButtonItem(choice.Id, display.Text);
            button.Tag             = choice;
            choice.ReferenceWidget = button;

            button.ImageIndex = m_largeImages.GetImageIndex(display.ImageLabel);

            button.Text = display.Text;
            button.Name = choice.Value;

            button.ButtonStyle = eButtonStyle.ImageAndText;

            if (!display.Enabled)
            {
                button.Text = button.Text + " NA";
            }

            button.Click += new EventHandler(OnClickAreaButton);

            button.ButtonStyle = DevComponents.DotNetBar.eButtonStyle.ImageAndText;
            //button.Image = ((System.Drawing.Image)(resources.GetObject("buttonItem2.Image")));
            //	button.Name = "buttonItem2";
            button.OptionGroup = "navBar";
            button.Style       = DevComponents.DotNetBar.eDotNetBarStyle.Office2003;

            button.Checked = display.Checked;

            MakePanelToGoWithButton(NavPane, button, choice);

            NavPane.Items.Add(button);
            //a button in this framework not really a Control... so I don't know how to use
            //(the same company's) balloon tip control on a sidebar button!
            //	m_mediator.SendMessage("RegisterHelpTarget", button.ContainerControl);
#else
            string tabname = GetListIdFromListPropertyChoice(choice);
            Tab    tab     = new Tab(tabname)
            {
                Enabled = choice.Enabled,
                Text    = choice.Label,
                Icon    = m_largeImages.GetImage(choice.ImageName),
                Tag     = choice,
            };
            choice.ReferenceWidget = tab;
            m_sidepane.AddTab(tab);
#endif
        }
Esempio n. 2
0
        /// <summary>
        /// Create a tab on the sidebar from a choice.
        /// </summary>
        protected void MakeAreaButton(ListPropertyChoice choice)
        {
            string tabname = GetListIdFromListPropertyChoice(choice);
            Tab    tab     = new Tab(tabname)
            {
                Enabled = choice.Enabled,
                Text    = choice.Label,
                Icon    = m_largeImages.GetImage(choice.ImageName),
                Tag     = choice,
            };

            choice.ReferenceWidget = tab;
            m_sidepane.AddTab(tab);
        }
Esempio n. 3
0
        /// ------------------------------------------------------------------------------------
        /// <summary>
        /// Add category tab to sidebar
        /// </summary>
        /// ------------------------------------------------------------------------------------
        public void AddTab(SBTabProperties tabProps)
        {
            if (tabProps == null)
            {
                return;
            }

            m_tabProps.Add(tabProps);

            Tab tab = new Tab(tabProps.Name);

            tab.Text = tabProps.Text;
            if (m_tabImageList != null)
            {
                tab.Icon = m_tabImageList.Images[tabProps.ImageIndex];
            }
            tab.Enabled = tabProps.Enabled;
            m_sidePane.AddTab(tab);
        }