/// <summary> /// /// </summary> /// <param name="group"></param> public void AddGroup(XCore.ChoiceGroup group) { ClearMainPanelControls(); ArrayList l = new ArrayList(group.Count); foreach (ChoiceRelatedClass item in group) { l.Add(item); } l.Reverse(); foreach (ChoiceRelatedClass item in l) { XCore.ChoiceRelatedClass choice = (XCore.ChoiceRelatedClass) this.Tag; UIItemDisplayProperties display = item.GetDisplayProperties(); if (!display.Visible) { continue; } if (item is ChoiceBase) { AddHotlink((ChoiceBase)item); } else if (item is ChoiceGroup) { AddMenu((ChoiceGroup)item); } } }
protected void AddMenu(XCore.ChoiceGroup choice) { PanelMenu button = new PanelMenu(choice, m_smallImages, m_menuBarAdapter); Spacer s = new Spacer(); m_panelMain.Controls.Add(s); s.Dock = DockStyle.Left; s.Width = 10; m_panelMain.Controls.Add(button); button.Dock = DockStyle.Left; }
public PanelMenu(XCore.ChoiceGroup group, ImageCollection images, XCore.IUIMenuAdapter menuBarAdapter):base() { m_group = group; m_images = images; m_menuBarAdapter = menuBarAdapter; this.Dock = System.Windows.Forms.DockStyle.Right; this.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0))); this.Location = new System.Drawing.Point(576, 2); #if USE_DOTNETBAR this.Name = "panelEx1"; #else this.Name = "panel1"; #endif this.Anchor = System.Windows.Forms.AnchorStyles.None; this.Size = new System.Drawing.Size(16, 16); #if USE_DOTNETBAR this.Style.BackgroundImagePosition = eBackgroundImagePosition.Center; #endif // this.StyleMouseOver.BackColor1.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.ItemHotBackground; // this.StyleMouseOver.BackColor2.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.ItemHotBackground2; // this.StyleMouseOver.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.ItemHotText; #if USE_DOTNETBAR this.StyleMouseOver.Border = DevComponents.DotNetBar.eBorderType.SingleLine; this.StyleMouseOver.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; this.StyleMouseOver.BorderWidth = 1; this.Style.Alignment = System.Drawing.StringAlignment.Center; // this.Style.BackColor1.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; // this.Style.BackColor2.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; // this.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine; // this.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; // this.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; this.StyleMouseOver.Alignment = StringAlignment.Center; this.Style.GradientAngle = 90; #endif this.Click +=new EventHandler(PanelMenu_Click); this.TabIndex = 0; // this.Click += new EventHandler(m_infoBarButton_Click); this.Tag = group; Display(); // UpdateInfoBarButtonImage(); }
public PanelMenu(XCore.ChoiceGroup group, ImageCollection images, XCore.IUIMenuAdapter menuBarAdapter) : base() { m_group = group; m_images = images; m_menuBarAdapter = menuBarAdapter; this.Dock = System.Windows.Forms.DockStyle.Right; this.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0))); this.Location = new System.Drawing.Point(576, 2); #if USE_DOTNETBAR this.Name = "panelEx1"; #else this.Name = "panel1"; #endif this.Anchor = System.Windows.Forms.AnchorStyles.None; this.Size = new System.Drawing.Size(16, 16); #if USE_DOTNETBAR this.Style.BackgroundImagePosition = eBackgroundImagePosition.Center; #endif // this.StyleMouseOver.BackColor1.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.ItemHotBackground; // this.StyleMouseOver.BackColor2.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.ItemHotBackground2; // this.StyleMouseOver.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.ItemHotText; #if USE_DOTNETBAR this.StyleMouseOver.Border = DevComponents.DotNetBar.eBorderType.SingleLine; this.StyleMouseOver.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; this.StyleMouseOver.BorderWidth = 1; this.Style.Alignment = System.Drawing.StringAlignment.Center; // this.Style.BackColor1.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; // this.Style.BackColor2.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; // this.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine; // this.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; // this.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; this.StyleMouseOver.Alignment = StringAlignment.Center; this.Style.GradientAngle = 90; #endif this.Click += new EventHandler(PanelMenu_Click); this.TabIndex = 0; // this.Click += new EventHandler(m_infoBarButton_Click); this.Tag = group; Display(); // UpdateInfoBarButtonImage(); }
public PanelMenu(XCore.ChoiceGroup group, IImageCollection images, XCore.IUIMenuAdapter menuBarAdapter) : base() { m_group = group; m_images = images; m_menuBarAdapter = menuBarAdapter; this.Dock = System.Windows.Forms.DockStyle.Right; this.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0))); this.Location = new System.Drawing.Point(576, 2); this.Name = "panel1"; this.Anchor = System.Windows.Forms.AnchorStyles.None; this.Size = new System.Drawing.Size(16, 16); this.Click += new EventHandler(PanelMenu_Click); this.TabIndex = 0; // this.Click += new EventHandler(m_infoBarButton_Click); this.Tag = group; Display(); // UpdateInfoBarButtonImage(); }
public PanelMenu(XCore.ChoiceGroup group, IImageCollection images, XCore.IUIMenuAdapter menuBarAdapter):base() { m_group = group; m_images = images; m_menuBarAdapter = menuBarAdapter; this.Dock = System.Windows.Forms.DockStyle.Right; this.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0))); this.Location = new System.Drawing.Point(576, 2); this.Name = "panel1"; this.Anchor = System.Windows.Forms.AnchorStyles.None; this.Size = new System.Drawing.Size(16, 16); this.Click +=new EventHandler(PanelMenu_Click); this.TabIndex = 0; // this.Click += new EventHandler(m_infoBarButton_Click); this.Tag = group; Display(); // UpdateInfoBarButtonImage(); }
/// <summary> /// /// </summary> /// <param name="group"></param> public void AddGroup(XCore.ChoiceGroup group) { }