Beispiel #1
0
        public void HandleIdle(object sender, EventArgs ea)
        {
            if (engineMgr == null)
            {
                return;
            }

            chooseDesiredEngineState();
            engineMgr.UpdateEngineState();
            updateEngineStatusPanel();

            if (engineMgr.EngineState != FractalEngineState.Online)
            {
                return;
            }

            if (engineMgr.DoneIterating)
            {
                engineMgr.DoCycle();
            }
            else
            {
                while (appIsIdle())                //keep cycling as long as there are no messages in the queue
                {
                    engineMgr.DoCycle();
                    System.Threading.Thread.Sleep(0);                     //yield to other threads
                }
            }
        }