示例#1
0
文件: Game.cs 项目: cookgreen/OpenMB
        public void Run()
        {
            var root = new Root();

            string modArg = gameArgument.GetArgValue("Engine.Mod");
            var    mods   = ModManager.Instance.InstalledMods.Where(o => o.Value.MetaData.DisplayInChooser).ToList();

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            if (string.IsNullOrEmpty(modArg))
            {
                if (mods.Count == 0)
                {
                    MessageBox.Show("No module found, app will exit now!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    return;
                }
                else
                {
                    modArg = mods.First().Key;
                }
            }
            frmConfigureController controller = new frmConfigureController(new frmConfigure(modArg));

            controller.form.ShowDialog();
        }
示例#2
0
文件: Game.cs 项目: wuhuolong/OpenMB
        public void Run()
        {
            string modArg = gameArgument.GetArgValue("Engine.Mod");

            string showConfigArg = gameArgument.GetArgValue("Engine.ShowConfig");

            //if (string.IsNullOrEmpty(showConfigArg) || showConfigArg == "yes")
            //{
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            frmConfigureController controller = new frmConfigureController(new frmConfigure(modArg));

            controller.form.ShowDialog();
            //}
            //else
            //{
            //    GameApp app = new GameApp(null, modArg);
            //    app.Run();
            //}
        }
示例#3
0
文件: Game.cs 项目: lennyhans/OpenMB
        public void Run()
        {
            string modArg = gameArgument.GetArgValue("Engine.Mod");

            string showConfigArg = gameArgument.GetArgValue("Engine.ShowConfig");

            if (string.IsNullOrEmpty(showConfigArg) || showConfigArg == "yes")
            {
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);
                frmConfigureController controller = new frmConfigureController(new frmConfigure(modArg));
                controller.form.ShowDialog();
            }
            else
            {
                Root    root = new Root();
                GameApp app  = new GameApp(GameConfigXml.Load("game.xml", root), modArg);
                app.Run();
            }
        }