public static void KillMutex(Process p, params string[] mutex) { StartGameApp app = new StartGameApp(); app.BeginKillMutex(p.Id, mutex); app.WaitForExit(); }
public static int StartGame(string pathToGame, string args, string workingDir = null) { StartGameApp app = new StartGameApp(); app.BeginStartGame(pathToGame, args, workingDir); app.WaitForExit(); return(app.GetOutputAsProcessId()); }
public static void ScanMutex(SymlinkGameData[] games) { ClearStartData(); StartGameApp app = new StartGameApp(); app.BeginSymlinkGames(games); app.WaitForExit(); }
public static void RunMultipleTasks(StartGameData[] data, bool admin) { ClearStartData(); StartGameApp app = new StartGameApp(); StartGameData final = BuildMultipleTaskData(data); app.RunStartGame(final, admin); }
public static void RunPreBuiltData(StartGameData data, bool admin) { ClearStartData(); StartGameApp app = new StartGameApp(); app.RunStartGame(data, admin); app.WaitForExit(); }
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)); }
public static bool MutexExists(Process p, params string[] mutex) { StartGameApp app = new StartGameApp(); app.BeginMutexExists(p.Id, mutex); app.WaitForExit(); string output = app.GetOutputData(); bool result; if (bool.TryParse(output, out result)) { return(result); } return(false); }
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)); }