public void SetEvent(DSEvent eve, string msg = " ", bool quit = false) { lock (locker) { if (EventQueue == null) { EventQueue = new Queue <DSEvent>(); } EventQueue.Enqueue(eve); string str = "[" + eve.ToString() + "] " + msg + "\n"; if (msg != " ") { AddMsg(str); if (Configure.debug) { Console.WriteLine(str); } } } if (quit) { if (eve == DSEvent.Error) { throw new Exception(); } } }
public void SetEvent(DSEvent eve, string msg = " ") { if (EventQueue == null) { EventQueue = new Queue <DSEvent>(); } EventQueue.Enqueue(eve); string str = "[" + eve.ToString() + "] " + msg; AddMsg(str); Console.WriteLine(str); if (eve == DSEvent.Error) { throw new Exception(); } }