|
@@ -3791,30 +3791,15 @@ namespace PRSDesktop
|
|
|
|
|
|
private string GetLatestVersion(string location)
|
|
|
{
|
|
|
- return App.DatabaseSettings.DatabaseType switch
|
|
|
- {
|
|
|
- DatabaseType.Networked => Update.GetRemoteFile($"{location}/version").Content,
|
|
|
- DatabaseType.Standalone or DatabaseType.Local => File.ReadAllText(Path.Combine(location, "version.txt")),
|
|
|
- _ => "",
|
|
|
- } ?? "";
|
|
|
+ return Client.Version();
|
|
|
}
|
|
|
private string GetReleaseNotes(string location)
|
|
|
{
|
|
|
- return App.DatabaseSettings.DatabaseType switch
|
|
|
- {
|
|
|
- DatabaseType.Networked => Update.GetRemoteFile($"{location}/releasenotes").Content,
|
|
|
- DatabaseType.Standalone or DatabaseType.Local => File.ReadAllText(Path.Combine(location, "Release Notes.txt")),
|
|
|
- _ => "",
|
|
|
- } ?? "";
|
|
|
+ return Client.ReleaseNotes();
|
|
|
}
|
|
|
private byte[]? GetInstaller(string location)
|
|
|
{
|
|
|
- return App.DatabaseSettings.DatabaseType switch
|
|
|
- {
|
|
|
- DatabaseType.Networked => Update.GetRemoteFile($"{location}/install").RawBytes,
|
|
|
- DatabaseType.Standalone or DatabaseType.Local => File.ReadAllBytes(Path.Combine(location, "PRSDesktopSetup.exe")),
|
|
|
- _ => null,
|
|
|
- };
|
|
|
+ return Client.Installer();
|
|
|
}
|
|
|
|
|
|
private void CheckForUpdates()
|