mirror of
https://github.com/4sval/FModel.git
synced 2026-03-30 21:55:42 -05:00
this wasn't really needed but
This commit is contained in:
parent
5eaa6c5c92
commit
e9470242eb
|
|
@ -13,6 +13,7 @@ using MessageBox = AdonisUI.Controls.MessageBox;
|
|||
using MessageBoxButton = AdonisUI.Controls.MessageBoxButton;
|
||||
using MessageBoxImage = AdonisUI.Controls.MessageBoxImage;
|
||||
using MessageBoxResult = AdonisUI.Controls.MessageBoxResult;
|
||||
using FModel.Settings;
|
||||
|
||||
namespace FModel.ViewModels.ApiEndpoints
|
||||
{
|
||||
|
|
@ -109,11 +110,14 @@ namespace FModel.ViewModels.ApiEndpoints
|
|||
{
|
||||
if (args != null)
|
||||
{
|
||||
if (new Version(args.CurrentVersion) == args.InstalledVersion) return;
|
||||
Version currentVersion = new Version(args.CurrentVersion);
|
||||
if (currentVersion == args.InstalledVersion) return;
|
||||
|
||||
bool downgrade = currentVersion < args.InstalledVersion;
|
||||
var messageBox = new MessageBoxModel
|
||||
{
|
||||
Text = $"FModel {args.CurrentVersion} is available. You are using version {args.InstalledVersion}. Do you want to update the application now?",
|
||||
Caption = "Update Available",
|
||||
Text = $"The latest version of FModel {UserSettings.Default.UpdateMode} is {args.CurrentVersion}. You are using version {args.InstalledVersion}. Do you want to {(downgrade ? "downgrade" : "update")} the application now?",
|
||||
Caption = $"{(downgrade ? "Downgrade" : "Update")} Available",
|
||||
Icon = MessageBoxImage.Question,
|
||||
Buttons = MessageBoxButtons.YesNo(),
|
||||
IsSoundEnabled = false
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user