private void 新建NToolStripButton_Click(object sender, EventArgs e) { string name = "Task" + tasks.Count.ToString(); NewNameFrm nnf = new NewNameFrm(); nnf.ToolName = name; if (nnf.ShowDialog() == DialogResult.OK) { Task t = new Task(); CreatePage(nnf.ToolName, out t); stg.ConfigGroup.Add(t.configGroup); } }
private void tabctrl_task_DoubleClick(object sender, EventArgs e) { Task t = tabctrl_task.SelectedTab.Tag as Task; if (t != null && !Lock) { NewNameFrm nnf = new NewNameFrm(); nnf.ToolName = t.Name; if (nnf.ShowDialog() == DialogResult.OK) { t.Name = nnf.ToolName; t.configGroup.TaskName = nnf.ToolName; tabctrl_task.SelectedTab.Text = nnf.ToolName; } } }