Use CSharpier

This commit is contained in:
Tyrrrz
2023-08-22 21:17:19 +03:00
parent c410e745b1
commit 20f58963a6
174 changed files with 11084 additions and 10670 deletions

View File

@@ -27,7 +27,8 @@ public class RootViewModel : Screen, IHandle<NotificationMessage>, IDisposable
IEventAggregator eventAggregator,
DialogManager dialogManager,
SettingsService settingsService,
UpdateService updateService)
UpdateService updateService
)
{
_viewModelFactory = viewModelFactory;
_dialogManager = dialogManager;
@@ -78,7 +79,8 @@ public class RootViewModel : Screen, IHandle<NotificationMessage>, IDisposable
Notifications.Enqueue(
"Update has been downloaded and will be installed when you exit",
"INSTALL NOW", () =>
"INSTALL NOW",
() =>
{
_updateService.FinalizeUpdate(true);
RequestClose();
@@ -115,11 +117,15 @@ public class RootViewModel : Screen, IHandle<NotificationMessage>, IDisposable
}
// App has just been updated, display the changelog
if (_settingsService.LastAppVersion is not null && _settingsService.LastAppVersion != App.Version)
if (
_settingsService.LastAppVersion is not null
&& _settingsService.LastAppVersion != App.Version
)
{
Notifications.Enqueue(
$"Successfully updated to {App.Name} v{App.VersionString}",
"CHANGELOG", () => ProcessEx.StartShellExecute(App.ChangelogUrl)
"CHANGELOG",
() => ProcessEx.StartShellExecute(App.ChangelogUrl)
);
_settingsService.LastAppVersion = App.Version;
@@ -138,4 +144,4 @@ public class RootViewModel : Screen, IHandle<NotificationMessage>, IDisposable
public void Handle(NotificationMessage message) => Notifications.Enqueue(message.Text);
public void Dispose() => Notifications.Dispose();
}
}