Example #1
0
 private void CheckGameStatus()
 {
     availableSecondButtonTypes = new List <ButtonType>();
     FlagsHelper.Unset(ref gameStatus, GameStatus.INSTALLED);
     FlagsHelper.Unset(ref gameStatus, GameStatus.UPDATED);
     FlagsHelper.Unset(ref gameStatus, GameStatus.UNAVAILABLE);
     FlagsHelper.Unset(ref gameStatus, GameStatus.NONE);
     if (!string.IsNullOrEmpty(DownloadURL))
     {
         if (GameInstalled)
         {
             MainButtonType = ButtonType.PLAY;
             FlagsHelper.Set(ref gameStatus, GameStatus.INSTALLED);
             if (!UpToDate())
             {
                 availableSecondButtonTypes.Add(ButtonType.UPDATE);
             }
             else
             {
                 FlagsHelper.Set(ref gameStatus, GameStatus.UPDATED);
             }
         }
         else
         {
             MainButtonType = ButtonType.INSTALL;
             FlagsHelper.Set(ref gameStatus, GameStatus.NONE);
         }
     }
     else
     {
         MainButtonType = ButtonType.NONE;
         FlagsHelper.Set(ref gameStatus, GameStatus.UNAVAILABLE);
     }
     availableSecondButtonTypes.Add(ButtonType.UNINSTALL);
     availableSecondButtonTypes.Add(ButtonType.REPAIR);
 }
Example #2
0
 private bool hasUpdate()
 {
     return(FlagsHelper.IsSet(gameStatus, GameStatus.INSTALLED) && !FlagsHelper.IsSet(gameStatus, GameStatus.UPDATED));
 }