add update button

This commit is contained in:
2025-12-16 06:03:32 +01:00
parent d484b55823
commit ac787d1976
5 changed files with 87 additions and 8 deletions

View File

@@ -47,7 +47,7 @@ namespace BlueMine
#if !DEBUG
if(await UpdateManager.IsUpdateAvailable())
{
updateIcon.Visibility = Visibility.Visible;
updateButton.Visibility = Visibility.Visible;
UpdateManager.DownloadCompleted += UpdateManager_DownloadCompleted;
await UpdateManager.DownloadUpdateAsync();
}
@@ -69,7 +69,7 @@ namespace BlueMine
}.ShowDialogAsync();
if (result == Wpf.Ui.Controls.MessageBoxResult.Primary)
await UpdateManager.PerformUpdate();
await UpdateManager.PerformUpdate(true);
});
}
@@ -373,6 +373,11 @@ namespace BlueMine
Title = "Under construction"
}.ShowDialogAsync();
}
private void updateButton_Click(object sender, RoutedEventArgs e)
{
UpdateManager_DownloadCompleted();
}
}
public partial class MainWindow : FluentWindow