Exemplo n.º 1
0
 private void btnClosed_Click(object sender, EventArgs e)
 {
     if (shellRun.IsExited() == false)
     {
         if (MessageBox.Show("确定终止当前运行的程序么?", "提示",
                             MessageBoxButtons.OKCancel, MessageBoxIcon.Information) == DialogResult.OK)
         {
             shellRun.Cancel();
             this.Close();
         }
     }
     else
     {
         this.Close();
     }
 }