Exemplo n.º 1
0
 public void AddNewTab(string directory)
 {
     TabButton tab = new TabButton(directory);
     tab.MouseDown += Tab_MouseDown;
     tab.DragEnter += Tab_DragEnter;
     tab.DragOver += TabControl_DragOver;
     tab.OnClickX += Tab_OnClickX;
     tabs.Add(tab);
     this.Controls.Add(tab);
     TabRefresh();
     tab.QueryContinueDrag += Tab_QueryContinueDrag;
 }
Exemplo n.º 2
0
 public void TabButton_Init()
 {
     TabButton temp = new TabButton("test");
     Assert.AreEqual("test", temp.ButtonText);
 }
Exemplo n.º 3
0
        public void RemoveTab(TabButton tab)
        {
            int index = tabs.IndexOf(tab);
            tabs.Remove(tab);
            this.Controls.Remove(tab);

            TabButton temp = tabs.ElementAtOrDefault(index);
            if (temp == null)
            {
                temp = tabs.ElementAtOrDefault(--index);
            }
            if (temp == null)
            {
                if(this.NoTabExist != null) this.NoTabExist(tab);

                TabRefresh();
                return;
            }

            this.ShowTab(index);
            this.
            TabRefresh();
        }