Beispiel #1
0
        internal void TabAdded(ThemeTab Tab)
        {
            Tab.Parent           = this;
            Tab.Dock             = DockStyle.Fill;
            Tab.overfadeprogress = 0f;
            Tab.state            = ThemeTab.State.Normal;

            tabbar.SendToBack();

            if (tabs.Count == 1)
            {
                SelectedIndex = 0;
                ShowSelected();
            }
        }
Beispiel #2
0
        void ShowTab(ThemeTab Tab)
        {
            tabbar.Invalidate();
            Application.DoEvents();

            LoadingTransition lt = null;

            if ((this.selectedindex > -1) && (this.TopLevelControl != null))
            {
                lt        = new LoadingTransition();
                lt.Bounds = this.RectangleToScreen(this.SelectedTab.Bounds);
                lt.Show();
            }

            Tab.Dock = DockStyle.Fill;
            Tab.Width--;
            Tab.Visible = true;

            tabbar.SendToBack();

            foreach (ThemeTab tab in tabs)
            {
                tab.Visible = (tab == Tab);
            }

            if (lt != null)
            {
                lt.DisposeOnHide = true;

                if (tabchangeeffect == TabChangeEffect.Fade)
                {
                    lt.Fade();
                }
                else if (tabchangeeffect == TabChangeEffect.None)
                {
                    lt.Hide();
                }
            }
        }