Пример #1
0
        internal GameInformation(GameType gameType, IMediaFolder folder, GameParameters parameters, Stream icon, Stream background, string uniqueId)
        {
            this.GameType   = gameType;
            this.UniqueID   = uniqueId;
            this.Parameters = parameters;
            this.Icon       = icon;
            this.Background = background;

            this.Folder = folder;
        }
Пример #2
0
        /// <summary>
        /// Create a copy of the <see cref="GameParameters"/> instance.
        /// </summary>
        /// <returns>A copy of the <see cref="GameParameters"/> instance.</returns>
        public object Clone()
        {
            GameParameters p = new GameParameters();

            p.Category      = this.Category;
            p.DiscID        = this.DiscID;
            p.GameVersion   = this.GameVersion;
            p.Language      = this.Language;
            p.Region        = this.Region;
            p.SystemVersion = this.SystemVersion;
            p.Title         = this.Title;
            return(p);
        }
Пример #3
0
 /// <summary>
 /// Create a copy of the <see cref="GameParameters"/> instance.
 /// </summary>
 /// <returns>A copy of the <see cref="GameParameters"/> instance.</returns>
 public object Clone()
 {
     GameParameters p = new GameParameters();
     p.Category = this.Category;
     p.DiscID = this.DiscID;
     p.GameVersion = this.GameVersion;
     p.Language = this.Language;
     p.Region = this.Region;
     p.SystemVersion = this.SystemVersion;
     p.Title = this.Title;
     return p;
 }
Пример #4
0
        internal GameInformation( GameType gameType, IMediaFolder folder, GameParameters parameters, Stream icon, Stream background, string uniqueId )
        {
            this.GameType = gameType;
            this.UniqueID = uniqueId;
            this.Parameters = parameters;
            this.Icon = icon;
            this.Background = background;

            this.Folder = folder;
        }
Пример #5
0
        private static GameParameters ReadSfo( Stream sfo )
        {
            GameParameters gp = new GameParameters();
            SfoReader reader = new SfoReader( sfo );

            if( reader[ "TITLE" ] != null )
                gp.Title = reader[ "TITLE" ].Data as string;
            if( reader[ "CATEGORY" ] != null )
            {
                string categoryString = reader[ "CATEGORY" ].Data as string;
                switch( categoryString )
                {
                    case "WG":
                        gp.Category = GameCategory.WlanGame;
                        break;
                    case "MS":
                        gp.Category = GameCategory.SaveGame;
                        break;
                    case "UG":
                        gp.Category = GameCategory.UmdGame;
                        break;
                    case "UV":
                        gp.Category = GameCategory.UmdVideo;
                        break;
                    case "UA":
                        gp.Category = GameCategory.UmdAudio;
                        break;
                    case "UC":
                        gp.Category = GameCategory.CleaningDisc;
                        break;
                    case "MG":
                    default:
                        gp.Category = GameCategory.MemoryStickGame;
                        break;
                }
            }
            if( reader[ "DISC_ID" ] != null )
                gp.DiscID = reader[ "DISC_ID" ].Data as string;
            if( reader[ "DISC_VERSION" ] != null )
                gp.GameVersion = new Version( reader[ "DISC_VERSION" ].Data as string );
            if( reader[ "PSP_SYSTEM_VER" ] != null )
                gp.SystemVersion = new Version( reader[ "PSP_SYSTEM_VER" ].Data as string );
            if( reader[ "REGION" ] != null )
                gp.Region = ( int )reader[ "REGION" ].Data;
            if( reader[ "LANGUAGE" ] != null )
                gp.Language = reader[ "LANGUAGE" ].Data as string;

            return gp;
        }
Пример #6
0
        private static GameParameters ReadSfo(Stream sfo)
        {
            GameParameters gp     = new GameParameters();
            SfoReader      reader = new SfoReader(sfo);

            if (reader["TITLE"] != null)
            {
                gp.Title = reader["TITLE"].Data as string;
            }
            if (reader["CATEGORY"] != null)
            {
                string categoryString = reader["CATEGORY"].Data as string;
                switch (categoryString)
                {
                case "WG":
                    gp.Category = GameCategory.WlanGame;
                    break;

                case "MS":
                    gp.Category = GameCategory.SaveGame;
                    break;

                case "UG":
                    gp.Category = GameCategory.UmdGame;
                    break;

                case "UV":
                    gp.Category = GameCategory.UmdVideo;
                    break;

                case "UA":
                    gp.Category = GameCategory.UmdAudio;
                    break;

                case "UC":
                    gp.Category = GameCategory.CleaningDisc;
                    break;

                case "MG":
                default:
                    gp.Category = GameCategory.MemoryStickGame;
                    break;
                }
            }
            if (reader["DISC_ID"] != null)
            {
                gp.DiscID = reader["DISC_ID"].Data as string;
            }
            if (reader["DISC_VERSION"] != null)
            {
                gp.GameVersion = new Version(reader["DISC_VERSION"].Data as string);
            }
            if (reader["PSP_SYSTEM_VER"] != null)
            {
                gp.SystemVersion = new Version(reader["PSP_SYSTEM_VER"].Data as string);
            }
            if (reader["REGION"] != null)
            {
                gp.Region = ( int )reader["REGION"].Data;
            }
            if (reader["LANGUAGE"] != null)
            {
                gp.Language = reader["LANGUAGE"].Data as string;
            }

            return(gp);
        }