public static GameSystemMonitor Execute() { GameSystemMonitor form = null; var thread = new Thread(() => { form = new GameSystemMonitor(); Application.Run(form); }); thread.Start(); while (form == null) { Thread.Sleep(1); } return(form); }
public static void Shutdown(GameSystemMonitor monitor) { monitor.Invoke((MethodInvoker)(() => monitor.Close())); }