/// <summary> /// Clone当前用户 /// </summary> /// <param name="yourNmae">克隆出的用户的标识名</param> /// <returns>克隆体</returns> public CaseRunner Clone(string yourNmae) { if (runerActuator.IsActuatorDataFill) { CaseRunner cloneRunner = new CaseRunner(yourNmae, (CaseActionActuator)runerActuator.Clone()); cloneRunner.runnerCasePath = this.runnerCasePath; cloneRunner.startCell = this.startCell; //由于克隆用户的Cell数据是公用根用户的,所以起始点的指向也是可以共用的 return(cloneRunner); } else { return(null); } }
//选择Runner private void listView_CaseRunner_SelectedIndexChanged(object sender, EventArgs e) { if (listView_CaseRunner.SelectedItems != null) { if (listView_CaseRunner.SelectedItems.Count > 0) { selctRunner = (CaseRunner)listView_CaseRunner.SelectedItems[0].Tag; if (selctRunner != null) { llb_showRunner.Text = selctRunner.RunnerName + " >"; FillExecutionResult(selctRunner.RunerActuator.NowExecutionResultList); } } } }
/// <summary> /// 删除一个用户 /// </summary> /// <param name="yourCaseRunner">被删除用户</param> public void DelRunner(CaseRunner yourCaseRunner) { listView_CaseRunner.DelRunner(yourCaseRunner); caseRunnerList.Remove(yourCaseRunner); }
/// <summary> /// 添加一个新用户 /// </summary> /// <param name="yourCaseRunner">新用户</param> public void AddRunner(CaseRunner yourCaseRunner) { listView_CaseRunner.AddRunner(yourCaseRunner); caseRunnerList.Add(yourCaseRunner); }
//llb显示固定 private void llb_showRunner_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { selctRunner = null; listView_SelectRunner.BackColor = Color.LightSlateGray; }