Example #1
0
 private void btnStartStopScript_Click(object sender, EventArgs e)
 {
     if (this.datagridScripts.SelectedRows.Count <= 0)
     {
         return;
     }
     Objects.Script script = (Objects.Script)datagridScripts.SelectedRows[0].Cells[0].Value;
     if (!script.IsRunning)
     {
         script.Run(true);
     }
     else
     {
         script.Stop();
     }
 }