void AddTabPage(DebugScriptInfo info) { TabPage newPage = new TabPage(); ScriptTabPage control = new ScriptTabPage(info); newPage.Controls.Add(control); newPage.Text = control.Session.ScriptInfo.ScriptName; tabControl1.TabPages.Add(newPage); btnRunScript.Enabled = true; btnRunSelection.Enabled = true; btnAddTab.Enabled = true; btnSaveScript.Enabled = true; btnReload.Enabled = true; if (SETTING_NEW_TAB_GETS_FOCUS) { tabControl1.SelectedIndex = tabControl1.TabCount - 1; } closelabel.Visible = true; }
void AddTabPage(DebugScriptInfo info) { TabPage newPage = new TabPage(); ScriptTabPage control = new ScriptTabPage(info); newPage.Controls.Add(control); newPage.Text = control.Session.ScriptInfo.ScriptName; tabControl1.TabPages.Add(newPage); btnRunScript.Enabled = true; btnRunSelection.Enabled = true; btnAddTab.Enabled = true; btnSaveScript.Enabled = true; btnReload.Enabled = true; if (SETTING_NEW_TAB_GETS_FOCUS) tabControl1.SelectedIndex = tabControl1.TabCount - 1; closelabel.Visible = true; }