bloxstrap/Bloxstrap/UI/ViewModels/Dialogs/LaunchMenuViewModel.cs
pizzaboxer 2791cb0b2e
Refactor automatic updater + fix install details + fix launch flag parser + fix temp directory
Automatic updater now relies on the -upgrade flag specifically being set and uses a mutex for coordinating the process

Temp directory is now obtained appropriately (should fix exceptions relating to it?)

Installation details are now reconfigured on every upgrade

Specifying a nonexistant flag would insta-crash the app

Also, the message box was making the wrong sound for the warning icon
2024-08-30 13:29:51 +01:00

27 lines
871 B
C#

using System.Windows.Input;
using CommunityToolkit.Mvvm.Input;
using Bloxstrap.UI.Elements.About;
namespace Bloxstrap.UI.ViewModels.Installer
{
public class LaunchMenuViewModel
{
public string Version => string.Format(Strings.Menu_About_Version, App.Version);
public ICommand LaunchSettingsCommand => new RelayCommand(LaunchSettings);
public ICommand LaunchRobloxCommand => new RelayCommand(LaunchRoblox);
public ICommand LaunchAboutCommand => new RelayCommand(LaunchAbout);
public event EventHandler<NextAction>? CloseWindowRequest;
private void LaunchSettings() => CloseWindowRequest?.Invoke(this, NextAction.LaunchSettings);
private void LaunchRoblox() => CloseWindowRequest?.Invoke(this, NextAction.LaunchRoblox);
private void LaunchAbout() => new MainWindow().ShowDialog();
}
}