Beispiel #1
0
        public static int StartGame(string pathToGame, string args, string workingDir = null)
        {
            string dataFile = GetStartDataGamePath(pathToGame);

            if (File.Exists(dataFile))
            {
                File.Delete(dataFile);
            }

            StartGameApp app = new StartGameApp();

            app.BeginStartGame(pathToGame, args, workingDir);
            app.WaitForExit();

            string appId = File.ReadAllText(dataFile);

            return(int.Parse(appId));
        }