Example #1
0
 private void VerifySucceeded(RunResult runResult)
 {
     if (!runResult.Succeeded)
     {
         throw new FailedRunResult(runResult.ToString());
     }
 }
 /// <summary>
 /// Prints the run result to the file path specified.
 /// </summary>
 /// <param name="toFile"></param>
 public void PrintRunResult(string toFile)
 {
     using (var writer = new StreamWriter(toFile))
     {
         writer.Write(_runResult.ToString());
         writer.Flush();
     }
 }
Example #3
0
 public void SetResult2(RunResult relult)
 {
     if (lblResult2.InvokeRequired)
     {
         lblResult2.Invoke(new setResult1Handler(SetResult2), new object[] { relult });
     }
     else
     {
         if (relult == RunResult.OK)
         {
             lblResult2.ForeColor = Color.Green;
         }
         else
         {
             lblResult2.ForeColor = Color.Red;
         }
         lblResult2.Text = relult.ToString();
     }
 }