Example #1
0
 /// <summary>
 /// This method is called on exit. Both synchrone and asynchrone
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void p_Exited(object sender, EventArgs e)
 {
     si = new SimulationInfo();
     si.TotalRuntime = p.TotalProcessorTime;
     if (_killed)
     {
         si.ExitInfo = CauseOfStop.StoppedByUser;
     }
     else
     {
         if (p.ExitCode != 0)
         {
             si.ExitInfo = CauseOfStop.ConvergenceFailure;
         }
         else
         {
             si.ExitInfo = CauseOfStop.TotalTimeReached;
         }
     }
     if (SimulationFinished != null)
     {
         SimulationFinished(this, si);
     }
 }
Example #2
0
    /// <summary>
    /// This method is called on exit. Both synchrone and asynchrone
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    private void p_Exited(object sender, EventArgs e)
    {
        si = new SimulationInfo();
        si.TotalRuntime = p.TotalProcessorTime;
        if (_killed)
          si.ExitInfo = CauseOfStop.StoppedByUser;
        else
        {
          if (p.ExitCode != 0)
            si.ExitInfo = CauseOfStop.ConvergenceFailure;
          else
            si.ExitInfo = CauseOfStop.TotalTimeReached;

        }
        if (SimulationFinished != null)
        {
          SimulationFinished(this, si);
      }
    }
Example #3
0
 void simu_SimulationFinished(object sender, SimulationInfo SimInfo)
 {
   Dispatcher.Invoke(new Action(() => { OutputFile.AppendText(M.simu.TotalOutput); }));
 }