private void ThreadProc() { Log.Instance.Write("Drawing thread started"); // build the multicontroller IList <IController> controllers = new List <IController>(); for (int i = 0; i < windows.Count; ++i) { controllers.Add(windows[i].Controller); } // begin the controller loop, aborted by stop call int cachesize = 20; Log.Instance.Write("Cache Size = " + Convert.ToString(cachesize)); using (controller = new AsyncMultiController(new MultiController(controllers), cachesize)) { while (stopcall == false) { try { using (MultiControllerInstruction instruction = controller.GetInstruction()) { instruction.screen = instruction.controllerIndex; windows[instruction.controllerIndex].Draw(instruction); Thread.Sleep(instruction.longPause ? config.LongInterval : config.ShortInterval); } } catch (ThreadAbortException) { // ignore } catch (Exception ex) { Log.Instance.Write("Exception on drawing thread", ex); } } } //stopped = true; }
private void ThreadProc() { Log.Instance.Write("Drawing thread started"); // build the multicontroller IList<IController> controllers = new List<IController>(); for (int i = 0; i < windows.Count; ++i) { controllers.Add(windows[i].Controller); } // begin the controller loop, aborted by stop call int cachesize = 20; Log.Instance.Write("Cache Size = " + Convert.ToString(cachesize)); using (controller = new AsyncMultiController(new MultiController(controllers), cachesize )) { while (stopcall ==false) { try { using (MultiControllerInstruction instruction = controller.GetInstruction()) { instruction.screen = instruction.controllerIndex; windows[instruction.controllerIndex].Draw(instruction); Thread.Sleep(instruction.longPause ? config.LongInterval : config.ShortInterval); } } catch (ThreadAbortException) { // ignore } catch (Exception ex) { Log.Instance.Write("Exception on drawing thread", ex); } } } //stopped = true; }