Exemplo n.º 1
0
        public static void SymlinkGames(SymlinkGameData[] games)
        {
            ClearStartData();

            StartGameApp app = new StartGameApp();

            app.BeginSymlinkGames(games);
            app.WaitForExit();
        }
Exemplo n.º 2
0
        public static void RenameMutex(Process p, params string[] mutex)
        {
            ClearStartData();

            StartGameApp app = new StartGameApp();

            app.BeginKillMutex(p.Id, mutex);
            app.WaitForExit();
        }
Exemplo n.º 3
0
        public static void RunMultipleTasks(StartGameData[] data, bool admin)
        {
            ClearStartData();

            StartGameApp  app   = new StartGameApp();
            StartGameData final = BuildMultipleTaskData(data);

            app.RunStartGame(final, admin);
        }
Exemplo n.º 4
0
        public static void RunPreBuiltData(StartGameData data, bool admin)
        {
            ClearStartData();

            StartGameApp app = new StartGameApp();

            app.RunStartGame(data, admin);
            app.WaitForExit();
        }
Exemplo n.º 5
0
        public static string[] ScanGames(SearchStorageInfo[] storage)
        {
            ClearStartData();

            StartGameApp app = new StartGameApp();

            app.BeginScanGames(storage);
            app.WaitForExit();

            string dataPath = StartGameUtil.GetStartDataPath();
            string data     = File.ReadAllText(dataPath);

            return(JsonConvert.DeserializeObject <string[]>(data));
        }
Exemplo n.º 6
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));
        }