public static void Main(string[] args) { Application.Init(); try { string argsOverride = joinArguments(args); Settings settings = Settings.Load(); DebugManager mgr = new DebugManager(settings, argsOverride); if ((args.Length <= 0) || hasNonOptions(args)) { new App(settings, mgr, argsOverride); } if (args.Length > 0) { mgr.Start(); } if ((args.Length <= 0) || hasNonOptions(args)) { Application.Run(); } // Synchronously terminate the debugger mgr.Terminate(); while (mgr.IsRunning) { Application.RunIteration(); } settings.Save(); } catch (Exception ex) { MessageDialog dlg = new MessageDialog (null, DialogFlags.Modal, MessageType.Error, ButtonsType.Ok, "Unhandled exception: {0}", ex.Message); dlg.Title = "Olishell"; dlg.Run(); throw ex; } }
void OnDebuggerStop(object sender, EventArgs args) { debugManager.Terminate(); }
public static void Main(string[] args) { Application.Init(); try { string argsOverride = joinArguments(args); Settings settings = Settings.Load(); DebugManager mgr = new DebugManager(settings, argsOverride); if ((args.Length <= 0) || hasNonOptions(args)) new App(settings, mgr, argsOverride); if (args.Length > 0) mgr.Start(); if ((args.Length <= 0) || hasNonOptions(args)) Application.Run(); // Synchronously terminate the debugger mgr.Terminate(); while (mgr.IsRunning) Application.RunIteration(); settings.Save(); } catch (Exception ex) { MessageDialog dlg = new MessageDialog (null, DialogFlags.Modal, MessageType.Error, ButtonsType.Ok, "Unhandled exception: {0}", ex.Message); dlg.Title = "Olishell"; dlg.Run(); throw ex; } }