mirror of
https://github.com/bloxstraplabs/bloxstrap.git
synced 2025-04-21 10:01:27 -07:00
Make Hyperion dialog inherit from Fluent dialog
This commit is contained in:
parent
703181b336
commit
26a7dfe5af
@ -1,15 +1,11 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.ComponentModel;
|
||||
using System.Windows;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
|
||||
using CommunityToolkit.Mvvm.Input;
|
||||
|
||||
using Bloxstrap.Dialogs;
|
||||
using Bloxstrap.Enums;
|
||||
using Bloxstrap.Extensions;
|
||||
|
||||
namespace Bloxstrap.ViewModels
|
||||
|
@ -1,45 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using CommunityToolkit.Mvvm.Input;
|
||||
using System.ComponentModel;
|
||||
using Bloxstrap.Dialogs;
|
||||
using Bloxstrap.Enums;
|
||||
using Bloxstrap.Extensions;
|
||||
|
||||
namespace Bloxstrap.ViewModels
|
||||
{
|
||||
public class HyperionDialogViewModel : INotifyPropertyChanged
|
||||
public class HyperionDialogViewModel : FluentDialogViewModel, INotifyPropertyChanged
|
||||
{
|
||||
public event PropertyChangedEventHandler? PropertyChanged;
|
||||
public void OnPropertyChanged(string propertyName) => PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
||||
private readonly IBootstrapperDialog _dialog;
|
||||
|
||||
public ICommand CancelInstallCommand => new RelayCommand(CancelInstall);
|
||||
|
||||
public string Title => App.Settings.Prop.BootstrapperTitle;
|
||||
public string Message { get; set; } = "Please wait...";
|
||||
public bool ProgressIndeterminate { get; set; } = true;
|
||||
public int ProgressValue { get; set; } = 0;
|
||||
|
||||
public Visibility CancelButtonVisibility { get; set; } = Visibility.Collapsed;
|
||||
|
||||
public string Version => $"Bloxstrap v{App.Version}";
|
||||
|
||||
public HyperionDialogViewModel(IBootstrapperDialog dialog)
|
||||
public HyperionDialogViewModel(IBootstrapperDialog dialog) : base(dialog)
|
||||
{
|
||||
_dialog = dialog;
|
||||
}
|
||||
|
||||
private void CancelInstall()
|
||||
{
|
||||
_dialog.Bootstrapper?.CancelInstall();
|
||||
_dialog.CloseBootstrapper();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user