static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); DXEnvironment myEnv = new DXEnvironment(); string path = myEnv.getGameLocation(); //todo: completely redo this messy structure if (path == "") { MessageBox.Show("Please set your game folder location.", "Important"); FormMyConf fMyConf = new FormMyConf(); fMyConf.setConfig(ref myEnv); Application.Run(fMyConf); path = myEnv.getGameLocation(); } if (path != "") { startApp(path); } }
public void setConfig(ref DXEnvironment conf) { this.config = conf; this.txtGameFolder.Text = this.config.getGameLocation(); }