Пример #1
0
Файл: Itch.cs Проект: Nutzzz/GLC
 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);
         }
     }
 }
Пример #2
0
 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));
     }
 }
Пример #3
0
 // 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);
 }
Пример #4
0
 public static void InstallGame(CGame game)
 {
     CDock.DeleteCustomImage(game.Title);
     Launch();
 }
Пример #5
0
 // return value
 // -1 = not implemented
 // 0 = failure
 // 1 = success
 public static int InstallGame(CGame game)
 {
     CDock.DeleteCustomImage(game.Title);
     Launch();
     return(-1);
 }