private void Er_AddtoFinal(object sender, EventArgs e) { ucExecuteResults uce = (ucExecuteResults)sender; ListViewItem lvi = new ListViewItem(); lvi.Text = uce.PlanDetails.ActiveAgent.Name; lvi.SubItems.Add((uce.PlanDetails.PlanningTime.TotalMilliseconds / (double)1000).ToString(".##")); lvi.SubItems.Add(uce.PlanDetails.MakeSpan.ToString()); lvFinalPlans.Items.Add(lvi); }
private void AddResult(PlanDetails pd) { ucExecuteResults er = new ucExecuteResults(pd); er.SelectedGoalAchievementTime += Er_SelectedGoalAchievementTime; er.SelectedJointActionReq += Er_SelectedJointActionReq; er.CloseTab += Er_CloseTab; er.AddtoFinal += Er_AddtoFinal; TabPage tp = new TabPage(); tp.Text = "agent " + pd.ActiveAgent.ToString(); tp.Controls.Add(er); tcResults.TabPages.Add(tp); }
private void AddResult(Constant agent, ConditionalPlanTreeNode plan, PlanDetails pd, TimeSpan planningTime, Boolean valid) { string planAsText = PlanTreePrinter.Print(plan); ucExecuteResults er = new ucExecuteResults(agent, planAsText, pd, planningTime, valid); er.SelectedGoalAchievementTime += Er_SelectedGoalAchievementTime; er.CloseTab += Er_CloseTab; er.AddtoFinal += Er_AddtoFinal; TabPage tp = new TabPage(); tp.Text = "agent " + agent.ToString(); tp.Controls.Add(er); tcResults.TabPages.Add(tp); }