Exemple #1
0
        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;
            }
        }
Exemple #2
0
 void OnDebuggerStop(object sender, EventArgs args)
 {
     debugManager.Terminate();
 }
Exemple #3
0
        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;
            }
        }