Exemplo n.º 1
0
 /// <summary>
 /// Конструктор по умолчанию
 /// </summary>
 /// <param name="handler"></param>
 public GameThread(ThreadEventHandler handler)
 {
     Name = "Inicializtion";
     IsEnd = false;
     _th = new System.Threading.Thread(delegate()
     {
         while (true)
         {
             if (handler(this))
             {
                 IsEnd = true;
                 ThreadEnd(this);
                 break;
             }
             IsEnd = false;
         }
     }) { IsBackground = true };
 }
 private ThreadEventHandler()
 {
     EventHandler = this;
 }