예제 #1
0
        /// ------------------------------------------------------------------------------------
        /// <summary>
        /// There is one ItemPanel per tab. The ItemPanel contains the items
        /// for a single tab. The items on a ItemPanel are just items on a toolbar.
        /// The toolbar is contained by the ItemPanel.
        /// </summary>
        /// <param name="name">Name to give this panel.</param>
        /// <param name="owningAdapter"></param>
        /// ------------------------------------------------------------------------------------
        internal ItemPanel(string name, SIBAdapter owningAdapter)
        {
            m_themesActive = owningAdapter.m_dnbMngr.IsThemeActive;

            Name                    = name;
            Dock                    = DockStyle.Fill;
            Style.Border            = owningAdapter.m_navPane.TitlePanel.Style.Border;
            Style.BorderColor.Color = owningAdapter.m_navPane.TitlePanel.Style.BorderColor.Color;
            Style.GradientAngle     = 90;

            m_bar                 = new Bar();
            m_bar.Name            = name;
            m_bar.LayoutType      = eLayoutType.TaskList;
            m_bar.CanAutoHide     = false;
            m_bar.CanCustomize    = false;
            m_bar.CanHide         = false;
            m_bar.CanReorderTabs  = false;
            m_bar.CanUndock       = false;
            m_bar.Stretch         = true;
            m_bar.EqualButtonSize = true;
            m_bar.Font            = SystemInformation.MenuFont;
            m_bar.PaddingTop      = 8;

            m_bar.Style =
                (owningAdapter.m_dnbMngr.IsThemeActive ? eDotNetBarStyle.Office2003 : eDotNetBarStyle.Office2000);

            Controls.Add(m_bar);
            m_bar.ItemSpacing = 100;

            if (m_themesActive)
            {
                Style.BackColor1.Color = m_bar.ColorScheme.BarBackground;
                Style.BackColor2.Color = m_bar.ColorScheme.BarBackground2;
            }
            else
            {
                Style.BackColor1.Color = SystemColors.ControlDark;
                Style.BackColor2.Color = SystemColors.ControlDark;
                m_bar.BackColor        = SystemColors.ControlDark;
            }
        }
예제 #2
0
        /// ------------------------------------------------------------------------------------
        /// <summary>
        /// Creates a SideBarTab
        /// </summary>
        /// <param name="owningAdapter"></param>
        /// <param name="mediator"></param>
        /// <param name="tabProps"></param>
        /// ------------------------------------------------------------------------------------
        internal SideBarTab(SIBAdapter owningAdapter, Mediator mediator, SBTabProperties tabProps) :
            base(tabProps.Name, tabProps.Text)
        {
            m_owningAdapter = owningAdapter;
            m_mediator      = mediator;
            m_message       = tabProps.Message;
            m_tag           = tabProps.Tag;
            m_infoBarButtonToolTipFormat = tabProps.InfoBarButtonToolTipFormat;

            ImageIndex  = tabProps.ImageIndex;
            OptionGroup = "FwNavPanelTabs";
            ButtonStyle = eButtonStyle.ImageAndText;
            ThemeAware  = owningAdapter.m_dnbMngr.IsThemeActive;
            Enabled     = tabProps.Enabled;
            owningAdapter.m_navPane.Items.Add(this);

            // This has to be done after being added to the pane's item collection.

            // Add the panel (above the tab) that goes with the tab. This is a control
            // above the stack of buttons.
            NavigationPanePanel panel = new NavigationPanePanel();

            panel.Name       = tabProps.Name;
            panel.ParentItem = this;
            panel.Dock       = DockStyle.Fill;
            owningAdapter.m_navPane.Controls.Add(panel);

            // Add to the panel that holds the DNB toolbar that holds the tab items.
            m_itemPanel = new ItemPanel(Name, owningAdapter);
            m_itemPanel.ImageListSmall = m_smallImageList;
            m_itemPanel.ImageListLarge = m_largeImageList;
            m_itemPanel.SmallIconMode  = tabProps.SmallIconMode;
            panel.Controls.Add(m_itemPanel);

            InitMenuAndInfoBarButton(tabProps);

            Tooltip = Text;
        }
예제 #3
0
		/// <summary>Constructor</summary>
		/// <param name="aggregatingSidebar">sidebar which aggregates this SideBarItemAreaRenderer</param>
		public SideBarItemAreaRenderer(SIBAdapter aggregatingSidebar)
		{
			m_aggregatingSidebar = aggregatingSidebar;
		}
예제 #4
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Creates a SideBarTab
		/// </summary>
		/// <param name="owningAdapter"></param>
		/// <param name="mediator"></param>
		/// <param name="tabProps"></param>
		/// ------------------------------------------------------------------------------------
		internal SideBarTab(SIBAdapter owningAdapter, Mediator mediator, SBTabProperties tabProps) :
			base(tabProps.Name, tabProps.Text)
		{
			m_owningAdapter = owningAdapter;
			m_mediator = mediator;
			m_message = tabProps.Message;
			m_tag = tabProps.Tag;
			m_infoBarButtonToolTipFormat = tabProps.InfoBarButtonToolTipFormat;

			ImageIndex = tabProps.ImageIndex;
			OptionGroup = "FwNavPanelTabs";
			ButtonStyle = eButtonStyle.ImageAndText;
			ThemeAware = owningAdapter.m_dnbMngr.IsThemeActive;
			Enabled = tabProps.Enabled;
			owningAdapter.m_navPane.Items.Add(this);

			// This has to be done after being added to the pane's item collection.

			// Add the panel (above the tab) that goes with the tab. This is a control
			// above the stack of buttons.
			NavigationPanePanel panel = new NavigationPanePanel();
			panel.Name = tabProps.Name;
			panel.ParentItem = this;
			panel.Dock = DockStyle.Fill;
			owningAdapter.m_navPane.Controls.Add(panel);

			// Add to the panel that holds the DNB toolbar that holds the tab items.
			m_itemPanel = new ItemPanel(Name, owningAdapter);
			m_itemPanel.ImageListSmall = m_smallImageList;
			m_itemPanel.ImageListLarge = m_largeImageList;
			m_itemPanel.SmallIconMode = tabProps.SmallIconMode;
			panel.Controls.Add(m_itemPanel);

			InitMenuAndInfoBarButton(tabProps);

			Tooltip = Text;
		}
예제 #5
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// There is one ItemPanel per tab. The ItemPanel contains the items
		/// for a single tab. The items on a ItemPanel are just items on a toolbar.
		/// The toolbar is contained by the ItemPanel.
		/// </summary>
		/// <param name="name">Name to give this panel.</param>
		/// <param name="owningAdapter"></param>
		/// ------------------------------------------------------------------------------------
		internal ItemPanel(string name, SIBAdapter owningAdapter)
		{
			m_themesActive = owningAdapter.m_dnbMngr.IsThemeActive;

			Name = name;
			Dock = DockStyle.Fill;
			Style.Border = owningAdapter.m_navPane.TitlePanel.Style.Border;
			Style.BorderColor.Color = owningAdapter.m_navPane.TitlePanel.Style.BorderColor.Color;
			Style.GradientAngle = 90;

			m_bar = new Bar();
			m_bar.Name = name;
			m_bar.LayoutType = eLayoutType.TaskList;
			m_bar.CanAutoHide = false;
			m_bar.CanCustomize = false;
			m_bar.CanHide = false;
			m_bar.CanReorderTabs = false;
			m_bar.CanUndock = false;
			m_bar.Stretch = true;
			m_bar.EqualButtonSize = true;
			m_bar.Font = SystemInformation.MenuFont;
			m_bar.PaddingTop = 8;

			m_bar.Style =
				(owningAdapter.m_dnbMngr.IsThemeActive ? eDotNetBarStyle.Office2003 : eDotNetBarStyle.Office2000);

			Controls.Add(m_bar);
			m_bar.ItemSpacing = 100;

			if (m_themesActive)
			{
				Style.BackColor1.Color = m_bar.ColorScheme.BarBackground;
				Style.BackColor2.Color = m_bar.ColorScheme.BarBackground2;
			}
			else
			{
				Style.BackColor1.Color = SystemColors.ControlDark;
				Style.BackColor2.Color = SystemColors.ControlDark;
				m_bar.BackColor = SystemColors.ControlDark;
			}
		}
예제 #6
0
 /// <summary>Constructor</summary>
 /// <param name="aggregatingSidebar">sidebar which aggregates this SideBarItemAreaRenderer</param>
 public SideBarItemAreaRenderer(SIBAdapter aggregatingSidebar)
 {
     m_aggregatingSidebar = aggregatingSidebar;
 }