private void LoadTaskData() { List <string> tasks = Prefs.GetTask(comboBox1.Text); TaskName.Text = comboBox1.Text; listBox1.Items.Clear(); foreach (string task in tasks) { listBox1.Items.Add(task); } }
private static void RunTask(string s) { List <string> tasks = Prefs.GetTask(s); ProcessStartInfo psi = new ProcessStartInfo { FileName = "cmd", CreateNoWindow = true }; foreach (string S in tasks) { string task = S; foreach (KeyValuePair <string, string> row in Prefs.Replacements) { task = task.Replace("{" + row.Key + "}", row.Value); } byte[] data = Encoding.UTF8.GetBytes(task); psi.Arguments = "/C start wrap " + Convert.ToBase64String(data); new Process() { StartInfo = psi }.Start(); } }