Exemplo n.º 1
0
 public void UnActiveTabPage(MyTabPage tabPage)
 {
     this.SuspendLayout();
     tabPage.Location = new System.Drawing.Point(-this.Size.Width - 1, 0);
     this.ResumeLayout(false);
     this.ActivedTabPage = null;
 }
Exemplo n.º 2
0
        public void AddPage(string header, Control content)
        {
            var page    = new MyTabPage(this, header, content);
            var navItem = new MyTabNavItem(this, page);

            TabNav.AddTabNavItem(navItem);
            TabPageBox.ActiveTabPage(page);
        }
Exemplo n.º 3
0
 public MyTabNavItem(MyTabControl tabControl, MyTabPage tabPage)
 {
     this.TabControl = tabControl ?? throw new ArgumentNullException();
     this.TabPage    = tabPage ?? throw new ArgumentNullException();
     InitializeComponent();
     this.Header = TabPage.Header;
     this.label1.Refresh();
     this.flowLayoutPanel.Refresh();
 }
Exemplo n.º 4
0
 public void RemoveTabPage(MyTabPage tabPage)
 {
     try
     {
         this.Controls.Remove(tabPage);
     }
     catch
     {
     }
 }
Exemplo n.º 5
0
        public void ActiveTabPage(MyTabPage tabPage)
        {
            if (ActivedTabPage != null)
            {
                UnActiveTabPage(ActivedTabPage);
            }

            tabPage.Location = new System.Drawing.Point(this.Size.Width + 1, 0);
            tabPage.Size     = this.Size;
            if (!this.Controls.Contains(tabPage))
            {
                this.Controls.Add(tabPage);
            }
            this.SuspendLayout();
            tabPage.Location = new System.Drawing.Point(0, 0);
            tabPage.Show();
            this.ResumeLayout(false);
            this.ActivedTabPage = tabPage;
        }
Exemplo n.º 6
0
 public void ActiveTabPage(MyTabPage tabPage)
 {
     TabPageBox.ActiveTabPage(tabPage);
 }