public static void InstallGame(CGame game) { CDock.DeleteCustomImage(game.Title); if (OperatingSystem.IsWindows()) { try { using RegistryKey key = Registry.ClassesRoot.OpenSubKey(@"itch\shell\open\command", RegistryKeyPermissionCheck.ReadSubTree); string[] subs = GetRegStrVal(key, null).Split(' '); string command = ""; string args = ""; for (int i = 0; i > subs.Length; i++) { if (i > 0) { args += subs[i]; } else { command = subs[0]; } } CDock.StartAndRedirect(command, args.Replace("%1", INSTALL_GAME + "/" + GetGameID(game.ID))); } catch (Exception e) { CLogger.LogError(e); } } }
public static void InstallGame(CGame game) { CDock.DeleteCustomImage(game.Title); if (OperatingSystem.IsWindows()) { CDock.StartShellExecute(INSTALL_GAME + "/" + GetGameID(game.ID)); } else { Process.Start(INSTALL_GAME + "/" + GetGameID(game.ID)); } }
// return value // -1 = not implemented // 0 = failure // 1 = success public static int InstallGame(CGame game) { CDock.DeleteCustomImage(game.Title); if (OperatingSystem.IsWindows()) { CDock.StartShellExecute(START_GAME + game.ID); } else { Process.Start(START_GAME + game.ID); } return(1); }
public static void InstallGame(CGame game) { CDock.DeleteCustomImage(game.Title); Launch(); }
// return value // -1 = not implemented // 0 = failure // 1 = success public static int InstallGame(CGame game) { CDock.DeleteCustomImage(game.Title); Launch(); return(-1); }