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); }
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); }
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); }