public PageCollection() { TextToolTip.AutomaticDelay = 0; oRALabel expandLabel = new oRALabel { Width = 60, Height = 60, Icon_Hot = new Bitmap(ResourceHelper.GetResourceStream("Menu_H.png")), Icon_Normal = new Bitmap(ResourceHelper.GetResourceStream("Menu_N.png")), Colour_Hot = oRAColours.Colour_BG_Main, Text = @"Expand Tabs", }; expandLabel.Paint += PaintOverride; expandLabel.MouseDown += ExpandTC; Controls.Add(expandLabel); TotalHeight += 61; }
public void Add(oRAPage Page) { Pages.Add(Page); oRALabel l = new oRALabel { AutoSize = false, Width = 60, Height = 60, Icon_Normal = Page.Icon_Normal, Icon_Hot = Page.Icon_Hot, Location = new Point(0, TotalHeight), Index = Pages.Count - 1, Text = Page.Name, }; l.MouseDown += ChangeTab; l.MouseEnter += HandleMouseEnter; l.MouseLeave += HandleMouseLeave; l.Paint += PaintOverride; Controls.Add(l); TabContainer.Controls.Add((Control)Page.Contents); if (Pages.Count == 1) { l.Activated = true; l.Refresh(); } else { TabContainer.Controls.Remove((Control)Page.Contents); } TotalHeight += 61; }