public AccountProfile(GRWLifesaver grwLifesaver, System.String uuid) { if (grwLifesaver is null) { throw new System.ArgumentNullException("grwLifesaver"); } if (!AccountProfile.REGEX_ACCOUNTUUID.IsMatch(uuid)) { throw new System.ArgumentException("Invalid uuid"); } this.GRWLifesaver = grwLifesaver; this.UUID = uuid; this.UplayPC_SaveGame1 = new SaveGame(this, AccountProfile.UplayPCGameID, 1); this.UplayPC_SaveGame2 = new SaveGame(this, AccountProfile.UplayPCGameID, 2); this.UplayPC_SaveGame3 = new SaveGame(this, AccountProfile.UplayPCGameID, 3); this.UplayPC_SaveGame4 = new SaveGame(this, AccountProfile.UplayPCGameID, 4); this.UplayPC_SaveGame5 = new SaveGame(this, AccountProfile.UplayPCGameID, 5); this.UplayPC_SaveGame6 = new SaveGame(this, AccountProfile.UplayPCGameID, 6); this.UplayPC_SaveGame7 = new SaveGame(this, AccountProfile.UplayPCGameID, 7); this.UplayPC_SaveGame8 = new SaveGame(this, AccountProfile.UplayPCGameID, 8); this.UplayPC_SaveGame9 = new SaveGame(this, AccountProfile.UplayPCGameID, 9); this.UplayPC_SaveGame10 = new SaveGame(this, AccountProfile.UplayPCGameID, 10); this.UplayPC_SaveGame11 = new SaveGame(this, AccountProfile.UplayPCGameID, 11); this.UplayPC_SaveGame12 = new SaveGame(this, AccountProfile.UplayPCGameID, 12); this.UplayPC_SaveGame13 = new SaveGame(this, AccountProfile.UplayPCGameID, 13); this.UplayPC_SaveGame14 = new SaveGame(this, AccountProfile.UplayPCGameID, 14); this.UplayPC_SaveGame15 = new SaveGame(this, AccountProfile.UplayPCGameID, 15); this.UplayPC_SaveGame16 = new SaveGame(this, AccountProfile.UplayPCGameID, 16); this.UplayPC_SaveGame17 = new SaveGame(this, AccountProfile.UplayPCGameID, 17); this.UplayPC_SaveGame18 = new SaveGame(this, AccountProfile.UplayPCGameID, 18); this.UplayPC_SaveGame19 = new SaveGame(this, AccountProfile.UplayPCGameID, 19); this.UplayPC_SaveGame20 = new SaveGame(this, AccountProfile.UplayPCGameID, 20); this.SteamPC_SaveGame1 = new SaveGame(this, AccountProfile.SteamPCGameID, 1); this.SteamPC_SaveGame2 = new SaveGame(this, AccountProfile.SteamPCGameID, 2); this.SteamPC_SaveGame3 = new SaveGame(this, AccountProfile.SteamPCGameID, 3); this.SteamPC_SaveGame4 = new SaveGame(this, AccountProfile.SteamPCGameID, 4); this.SteamPC_SaveGame5 = new SaveGame(this, AccountProfile.SteamPCGameID, 5); this.SteamPC_SaveGame6 = new SaveGame(this, AccountProfile.SteamPCGameID, 6); this.SteamPC_SaveGame7 = new SaveGame(this, AccountProfile.SteamPCGameID, 7); this.SteamPC_SaveGame8 = new SaveGame(this, AccountProfile.SteamPCGameID, 8); this.SteamPC_SaveGame9 = new SaveGame(this, AccountProfile.SteamPCGameID, 9); this.SteamPC_SaveGame10 = new SaveGame(this, AccountProfile.SteamPCGameID, 10); this.SteamPC_SaveGame11 = new SaveGame(this, AccountProfile.SteamPCGameID, 11); this.SteamPC_SaveGame12 = new SaveGame(this, AccountProfile.SteamPCGameID, 12); this.SteamPC_SaveGame13 = new SaveGame(this, AccountProfile.SteamPCGameID, 13); this.SteamPC_SaveGame14 = new SaveGame(this, AccountProfile.SteamPCGameID, 14); this.SteamPC_SaveGame15 = new SaveGame(this, AccountProfile.SteamPCGameID, 15); this.SteamPC_SaveGame16 = new SaveGame(this, AccountProfile.SteamPCGameID, 16); this.SteamPC_SaveGame17 = new SaveGame(this, AccountProfile.SteamPCGameID, 17); this.SteamPC_SaveGame18 = new SaveGame(this, AccountProfile.SteamPCGameID, 18); this.SteamPC_SaveGame19 = new SaveGame(this, AccountProfile.SteamPCGameID, 19); this.SteamPC_SaveGame20 = new SaveGame(this, AccountProfile.SteamPCGameID, 20); }
/************************************************/ /*************** STATIC METHODS ***************/ /************************************************/ private static System.Boolean IsUplayInstallationDirectory(System.String path) { // prevent NullPointerException if (path is null) { return(false); } // normalize 'path' path = GRWLifesaver.NormalizePath(path); // the directory has to exist if (!System.IO.Directory.Exists(path)) { return(false); } // require a few files to exist if (!System.IO.File.Exists(path + "\\" + "Uplay.exe")) { return(false); } if (!System.IO.File.Exists(path + "\\" + "upc.exe")) { return(false); } if (!System.IO.File.Exists(path + "\\" + "UbisoftGameLauncher.exe")) { return(false); } if (!System.IO.File.Exists(path + "\\" + "UbisoftGameLauncher64.exe")) { return(false); } if (!System.IO.File.Exists(path + "\\" + "Uninstall.exe")) { return(false); } return(true); }