private void loadRecentFilesList() { // Reload items from the registry. for (int i = 0; i < Constants.MAX_RECENT_FILES; i++) { string file_name = (string)RegistryTools.GetSetting(Constants.APPLICATION_NAME, "FilePath" + i.ToString(), string.Empty); if (!string.IsNullOrWhiteSpace(file_name)) { _recentFilesInfos.Add(new FileInfo(file_name)); } } }
public string?usableGameContentIfExists() { string?registryPath = RegistryTools.GetSetting(Constants.APPLICATION_NAME, Constants.PAK_FILE_LOCATION_REGISTRY_KEY, "") as string; if (!string.IsNullOrWhiteSpace(registryPath)) { return(registryPath); } string?winstorePath = Constants.WINSTORE_PAKS_FOLDER_IF_EXISTS; if (!string.IsNullOrWhiteSpace(winstorePath) && Directory.Exists(winstorePath)) { return(winstorePath); } string launcherPath = Constants.PAKS_FOLDER_PATH; if (Directory.Exists(launcherPath)) { return(launcherPath); } return(null); }