示例#1
0
        public void AsyncRun(PStdoutDelegate pstdout, PStderrDelegate pstderr, PCompleteDelegate pcomplete)
        {
            FStdout   = pstdout;
            FStderr   = pstderr;
            FComplete = pcomplete;

            Thread = new Thread(ThreadedRun);
            Thread.Start(0);
        }
示例#2
0
        public void AsyncRun(PStdoutDelegate pstdout, PStderrDelegate pstderr, PCompleteDelegate pcomplete)
        {
            FStdout   = pstdout;
            FStderr   = pstderr;
            FComplete = pcomplete;

            Thread = new Thread(ThreadedRun);
            Thread.Start(1000 * 60); // Give the job 60 sec to cleanly finish
        }
示例#3
0
 /// <summary>
 /// Terminate this job
 /// </summary>
 public void Terminate()
 {
     try
     {
         FStdout   = null; // Disable all callbacks since the client class could have been disposed of
         FStderr   = null;
         FComplete = null;
         Proc.Kill();    // Immediately stop the process!
     }
     catch (Exception)
     {
         App.PrintLogMessage("Exec.Terminate() exception", MessageType.Error);
     }
 }
示例#4
0
        public void AsyncRun(PStdoutDelegate pstdout, PStderrDelegate pstderr, PCompleteDelegate pcomplete)
        {
            FStdout = pstdout;
            FStderr = pstderr;
            FComplete = pcomplete;

            Thread = new Thread(ThreadedRun);
            Thread.Start(0);
        }
示例#5
0
 /// <summary>
 /// Terminate this job
 /// </summary>
 public void Terminate()
 {
     try
     {
         FStdout = null; // Disable all callbacks since the client class could have been disposed of
         FStderr = null;
         FComplete = null;
         Proc.Kill();    // Immediately stop the process!
     }
     catch (Exception)
     {
         App.PrintLogMessage("Exec.Terminate() exception", MessageType.Error);
     }
 }