Ejemplo n.º 1
0
        /// <summary>
        /// Gets a title icon. If it isn't cached locally, gets it from nintendo.
        /// TODO: Remote and local paths are currently hard-coded in the image loader!
        /// </summary>
        /// <param name="game"></param>
        /// <returns></returns>
        private SwitchImage LoadTitleIcon(SwitchGame game)
        {
            SwitchImage img = loader.GetLocalImage(game.TitleID);

            if (img == null)
            {
                // Ask the image loader to get the image remotely and cache it
                img = loader.GetRemoteImage(game);
            }

            // Return cached image
            return(img);
        }
 public SwitchCollectionItem(string name, string titleid, string titlekey, SwitchCollectionState state, bool isFavorite)
 {
     Game       = new SwitchGame(name, titleid, titlekey);
     State      = state;
     IsFavorite = isFavorite;
 }