private GamePack(int index, GamePackTypes type, int pIndex, GamePackNames name, string game, string display) { this.Index = index; this.Type = type; this.PIndex = pIndex; this.Name = name; this.RegName = game; this.DisplayName = display; if (type == GamePackTypes.Base) { this.PackName = String.Empty; } else { this.PackName = GamePackType.GetName(type) + pIndex.ToString().PadLeft(2, '0'); } this.Ts3Name = Ts3Head + this.PackName; }
/// <summary> /// 创建一个用于具有指定读写权限的模拟人生3游戏包注册表信息的一个实例 /// </summary> /// <param name="name">游戏包名</param> /// <param name="writable">是否以可读写的方式创建</param> public SimsRegistryInfo(GamePackNames name, bool writable) : this(GamePack.GetGamePackByName(name), writable) { }
/// <summary> /// <para>创建一个用于获取模拟人生3游戏包注册表信息的一个实例</para> /// <para>如果需要修改注册表中的值, 请参见其重载构造方法.</para> /// </summary> /// <param name="name">游戏包名</param> public SimsRegistryInfo(GamePackNames name) : this(name, false) { }
/// <summary> /// 通过名称查找游戏包 /// </summary> public static GamePack GetGamePackByName(GamePackNames name) { switch (name) { case GamePackNames.Base: return(Base); case GamePackNames.WorldAdventures: return(Ep01); case GamePackNames.HighEndLoftStuff: return(Sp01); case GamePackNames.Ambitions: return(Ep02); case GamePackNames.FastLaneStuff: return(Sp02); case GamePackNames.LateNight: return(Ep03); case GamePackNames.OutdoorLivingStuff: return(Sp03); case GamePackNames.Generations: return(Ep04); case GamePackNames.TownLifeStuff: return(Sp04); case GamePackNames.Pets: return(Ep05); case GamePackNames.MasterSuiteStuff: return(Sp05); case GamePackNames.Showtime: return(Ep06); case GamePackNames.KatyPerrySweetTreats: return(Sp06); case GamePackNames.DieselStuff: return(Sp07); case GamePackNames.Supernatural: return(Ep07); case GamePackNames.Seasons: return(Ep08); case GamePackNames._70_80_90s: return(Sp08); case GamePackNames.UniversityLife: return(Ep09); default: return(null); } }