void removeAppFromDIBVERFile() { Dictionary <string, int> versionsData = DIBVERHandler.GetVersionsData(Paths.DIBVER_FILE_PATH); if (versionsData.ContainsKey(appName)) { versionsData.Remove(appName); } DIBVERHandler.SaveVersionsData(Paths.DIBVER_FILE_PATH, versionsData); }
public async Task UpdateToVersion(int targetVersion, bool force = false) { createResourcesIfDoesntExist(); string uri = $"http://caps.fail:5000/api/dibDownload/{appName}/{targetVersion}"; versionsData = DIBVERHandler.GetVersionsData(Paths.DIBVER_FILE_PATH); if (!force && versionsData.ContainsKey(appName)) { uri += $"/{versionsData[appName]}"; } await update(uri, force); }
public async Task <bool> IsUpdateAvailable() { string uri = $"http://caps.fail:5000/api/dibInfo/GetVersionInfo/{appName}"; string versionStr = await httpClient.GetStringAsync(uri); int versionNumber = int.Parse(versionStr); Dictionary <string, int> versionsData = DIBVERHandler.GetVersionsData(Paths.DIBVER_FILE_PATH); if (versionsData.ContainsKey(appName)) { return(!(versionNumber == versionsData[appName])); } return(false); }
void updateAppVersion() { int currentVersion = getVersion(); versionsData = DIBVERHandler.GetVersionsData(Paths.DIBVER_FILE_PATH); if (versionsData.ContainsKey(appName)) { versionsData[appName] = currentVersion; } else { versionsData.Add(appName, currentVersion); } DIBVERHandler.SaveVersionsData(Paths.DIBVER_FILE_PATH, versionsData); }
public async Task <bool> IsInstalled() { Dictionary <string, int> versionsData = DIBVERHandler.GetVersionsData(Paths.DIBVER_FILE_PATH); return(versionsData.ContainsKey(appName)); }