Exemple #1
0
 public TabButton(TabOrientations orientation, DockPanel panel)
 {
     base.SetStyle(ControlStyles.SupportsTransparentBackColor | ControlStyles.ResizeRedraw | ControlStyles.UserPaint, true);
     this.BackColor = Color.Transparent;
     this.ForeColor = Color.LightGray;
     this.mOrientation = orientation;
     this.mPanel = panel;
     this.mManager = SkinManager.Docking;
     this.LoadImages();
     this.TextSize = DrawUtil.MeasureString(base.CreateGraphics(), this.Panel.Title, this.Font);
     base.Width = (this.LeftImage.Width + this.RightImage.Width) + ((int) this.TextSize.Width);
     if (this.Panel.Icon != null)
     {
         base.Width += this.Panel.Icon.Width;
     }
     base.Height = this.MidImage.Height;
 }
Exemple #2
0
 public DockTabGroup(TabOrientations orientation)
 {
     EventHandler handler = null;
     this.mOrientation = TabOrientations.Bottom;
     this.mPanels = new List<DockPanel>();
     this.InitializeComponent();
     this.Dock = System.Windows.Forms.DockStyle.Fill;
     this.mOrientation = orientation;
     this.RefreshSkin();
     if (handler == null)
     {
         handler = delegate (object s, EventArgs e) {
             this.ArrangePanels();
         };
     }
     base.SizeChanged += handler;
     this.ArrangePanels();
 }