Ejemplo n.º 1
0
        static void Main()
        {
#if (!DEBUG)
            try
            {
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);

                /* pre-load stuff */
                PreLoad.Load();
                mainForm = new Loading();

                Application.Run(mainForm);
            }
            catch (Exception ex)
            {
                GModIDE.Classes.ErrorHandler.CreateError(ex, "Unmanaged error caught!", 100000);
            }
#else
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            mainForm = new MainForm();

            Application.Run(mainForm);
#endif
        }
Ejemplo n.º 2
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            /* Load */
            PreLoad.Load();

            /* Workspace */
            _workspace = new Workspace(this, dckMain, null, null, null, null, null);

            /* Add Plugin Menu Items */
            foreach (KeyValuePair <MenuSection, List <ToolStripMenuItem> > kv in PluginManager.MenuItems)
            {
                if (kv.Value.Count > 0)
                {
                    _workspace.AddMenuItem(kv.Key, new ToolStripSeparator());

                    foreach (ToolStripMenuItem tmi in kv.Value)
                    {
                        _workspace.AddMenuItem(kv.Key, tmi);
                    }
                }
            }

            /* Language */
            LanguageManager.HandleForm(this);
        }