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(); }
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(); //} }
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(); } }