public int RunCommandLine_Task(string typeStr, string app_name, string command_arguments) { ProcessTask pt = new ProcessTask(); count++; pt.idx = count; pt.desc = typeStr; pt.startTime = DateTime.Now; pt.AddTask(typeStr, app_name, command_arguments); pt.itemIdx = listBox_Process.Items.Add(pt.ToDescString()); m_process_task.Add(pt.idx, pt); Program.AddCommandLog(typeStr, app_name, command_arguments); return(pt.idx); }
public void RunCommandLine_MultiTask(process_task[] tasks) { ProcessTask pt = new ProcessTask(); count++; pt.idx = count; pt.startTime = DateTime.Now; foreach (var t in tasks) { pt.AddTask(t.task_desc, t.app_name, t.app_args); string typeStr = "MultiTask-"; typeStr += t.task_desc; Program.AddCommandLog(typeStr, t.app_name, t.app_args); } pt.itemIdx = listBox_Process.Items.Add(pt.ToDescString()); m_process_task.Add(pt.idx, pt); }