mirror of
https://github.com/bloxstraplabs/bloxstrap.git
synced 2025-04-23 11:01:26 -07:00
34 lines
1.2 KiB
C#
34 lines
1.2 KiB
C#
using System.Windows;
|
|
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 Visibility RobloxStudioOptionVisibility => App.IsStudioVisible ? Visibility.Visible : Visibility.Collapsed;
|
|
|
|
public ICommand LaunchSettingsCommand => new RelayCommand(LaunchSettings);
|
|
|
|
public ICommand LaunchRobloxCommand => new RelayCommand(LaunchRoblox);
|
|
|
|
public ICommand LaunchRobloxStudioCommand => new RelayCommand(LaunchRobloxStudio);
|
|
|
|
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 LaunchRobloxStudio() => CloseWindowRequest?.Invoke(this, NextAction.LaunchRobloxStudio);
|
|
|
|
private void LaunchAbout() => new MainWindow().ShowDialog();
|
|
}
|
|
}
|