コード例 #1
0
 public static GenerateOutput Instance()
 {
     if (cm_instance == null)
     {
         cm_instance = new GenerateOutput();// throw new ApplicationException("No GenerateOutput instance set!");
     }
     return(cm_instance);
 }
コード例 #2
0
 /// <summary>
 /// If generator still running, abort it, wait for it to stop.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void GeneratorOutput_Closed(object sender, System.EventArgs e)
 {
     if (m_GeneratorThread != null && m_GeneratorThread.IsAlive)
     {
         m_GeneratorThread.Abort();
         m_GeneratorThread.Join();
         m_GeneratorThread = null;
         m_ready           = true;
         Notify();
     }
     cm_instance = null;
 }