Ejemplo n.º 1
0
        private TabComponent LoadTab(string tabName)
        {
            TabComponent newTab = GetTabComponentFromOjbectPool();

            newTab.GetTabUI.SetTabName(tabName);
            newTab.TabID = currentTabs.Count;
            newTab.SetManager(this);

            newTab.GetTabData.LoadProject(tabName);

            return(newTab);
        }
Ejemplo n.º 2
0
        public void RemoveTab(TabComponent tab)
        {
            TabComponent foundTab = GetTab(tab.TabID);

            if (foundTab != null)
            {
                currentTabs.RemoveAt(foundTab.TabID);

                foundTab.ChangeState(false);

                // Retun to object pool.
                foundTab.ReturnToPool(tabItemName, transform);
            }

            RearrangeTabsPosition(true);
        }
Ejemplo n.º 3
0
        private TabComponent CreateNewTab(string tabName)
        {
            TabComponent newTab = GetTabComponentFromOjbectPool();

            bool   isTabNameNull = string.IsNullOrEmpty(tabName);
            string projectName   = isTabNameNull ? "Test" + (currentTabs.Count + 1).ToString() : tabName;

            // Set TabUI.
            newTab.GetTabUI.SetTabName(projectName);
            newTab.GetTabData.CreateNewProject(projectName);
            newTab.SetManager(this);

            // Test. Add Entry Block.
            WorkspaceManager.Instance.AddEntryNode();

            return(newTab);
        }