UpdateData.cs 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. using InABox.Core;
  2. using NPOI.HPSF;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. namespace InABox.Server
  8. {
  9. public static class UpdateData
  10. {
  11. public static string GetUpdateVersionFile()
  12. {
  13. return Path.Combine(CoreUtils.GetCommonAppData(), "update/version.txt");
  14. }
  15. public static string GetUpdateInstallerFile()
  16. {
  17. return Path.Combine(CoreUtils.GetCommonAppData(), "update/PRSDesktopSetup.exe");
  18. }
  19. public static string GetReleaseNotesFile()
  20. {
  21. return Path.Combine(CoreUtils.GetCommonAppData(), "update/Release Notes.txt");
  22. }
  23. public static string GetUpdateVersion()
  24. {
  25. return File.ReadAllText(GetUpdateVersionFile());
  26. }
  27. public static byte[] GetUpdateInstaller()
  28. {
  29. return File.ReadAllBytes(GetUpdateInstallerFile());
  30. }
  31. public static string GetReleaseNotes()
  32. {
  33. return File.ReadAllText(GetReleaseNotesFile());
  34. }
  35. }
  36. }