Zachary-Rude_task-manager/SimpleTaskManager/RunNewTaskForm.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace SimpleTaskManager
{
    public partial class RunNewTaskForm : Form
    {
        public RunNewTaskForm()
        {
            InitializeComponent();
        }

        private void btnRun_Click(object sender, EventArgs e) // chạy một ứng dụng mà người dùng mới nhập vào
        {
            if (!string.IsNullOrEmpty(openInput.Text))
            {
                try
                {
                    Process proc = new Process();
                    proc.StartInfo.FileName = openInput.Text;
                    proc.StartInfo.Arguments = txtArgs.Text;
                    proc.Start();
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message, "Cannot run process", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
        }

        private void RunNewTaskForm_Load(object sender, EventArgs e)
        {

        }

        private void label1_Click(object sender, EventArgs e)
        {

        }
    }
}
