AGS.Editor.ApplicationController.StartGUI C# (CSharp) Метод

StartGUI() публичный Метод

public StartGUI ( string commandLineArguments ) : void
commandLineArguments string
Результат void
        public void StartGUI(string[] commandLineArguments)
        {
            _agsEditor.ApplicationStarted = true;
            _guiController.StartGUI(commandLineArguments);
        }

Usage Example

Пример #1
0
        private static void RunApplication(string[] args)
        {
#if !DEBUG
            try
            {
#endif
            Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
            Application.ThreadException += new System.Threading.ThreadExceptionEventHandler(Application_ThreadException);
            AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
            AppDomain.CurrentDomain.AssemblyResolve    += new ResolveEventHandler(CurrentDomain_AssemblyResolve);

            string filePath = System.Reflection.Assembly.GetExecutingAssembly().Location;
            Directory.SetCurrentDirectory(Path.GetDirectoryName(filePath));

#if BIBLE_EDITION
            Application.Run(new SelectReligion());
            // Need to re-add these because the end of Application.Run removes them
            Application.ThreadException += new System.Threading.ThreadExceptionEventHandler(Application_ThreadException);
            AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
#endif

            SplashScreen splash = new SplashScreen();
            splash.Load += new EventHandler(splash_Load);
            Application.Run(splash);

            // Need to re-add these because the end of Application.Run removes them
            Application.ThreadException += new System.Threading.ThreadExceptionEventHandler(Application_ThreadException);
            AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);

            _application.StartGUI(args);
#if !DEBUG
        }
        catch (Exception ex)
        {
            MessageBox.Show("An unexpected error occurred. See below for details." + Environment.NewLine + ex.ToString(), "Application Error", MessageBoxButtons.OK, MessageBoxIcon.Stop);
        }
#endif
        }