diff --git a/Bloxstrap/Enums/BootstrapperStyle.cs b/Bloxstrap/Enums/BootstrapperStyle.cs
index 2d1b063..6b1d36b 100644
--- a/Bloxstrap/Enums/BootstrapperStyle.cs
+++ b/Bloxstrap/Enums/BootstrapperStyle.cs
@@ -7,6 +7,7 @@
LegacyDialog2011,
ProgressDialog,
FluentDialog,
- ByfronDialog
+ ByfronDialog,
+ ProgressFluentDialog,
}
}
diff --git a/Bloxstrap/UI/Elements/Bootstrapper/ProgressFluentDialog.xaml b/Bloxstrap/UI/Elements/Bootstrapper/ProgressFluentDialog.xaml
new file mode 100644
index 0000000..77ccc24
--- /dev/null
+++ b/Bloxstrap/UI/Elements/Bootstrapper/ProgressFluentDialog.xaml
@@ -0,0 +1,68 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Bloxstrap/UI/Elements/Bootstrapper/ProgressFluentDialog.xaml.cs b/Bloxstrap/UI/Elements/Bootstrapper/ProgressFluentDialog.xaml.cs
new file mode 100644
index 0000000..710682e
--- /dev/null
+++ b/Bloxstrap/UI/Elements/Bootstrapper/ProgressFluentDialog.xaml.cs
@@ -0,0 +1,117 @@
+using Bloxstrap.UI.Elements.Bootstrapper.Base;
+using Bloxstrap.UI.ViewModels.Bootstrapper;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Forms;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Shapes;
+using System.Windows.Threading;
+
+namespace Bloxstrap.UI.Elements.Bootstrapper
+{
+ ///
+ /// Interaction logic for ProgressFluentDialog.xaml
+ ///
+ public partial class ProgressFluentDialog : IBootstrapperDialog
+ {
+ private readonly BootstrapperDialogViewModel _viewModel;
+
+ public Bloxstrap.Bootstrapper? Bootstrapper { get; set; }
+
+ private bool _isClosing;
+
+ #region UI Elements
+ public string Message
+ {
+ get => _viewModel.Message;
+ set
+ {
+ _viewModel.Message = value;
+ _viewModel.OnPropertyChanged(nameof(_viewModel.Message));
+ }
+ }
+
+ public ProgressBarStyle ProgressStyle
+ {
+ get => _viewModel.ProgressIndeterminate ? ProgressBarStyle.Marquee : ProgressBarStyle.Continuous;
+ set
+ {
+ _viewModel.ProgressIndeterminate = (value == ProgressBarStyle.Marquee);
+ _viewModel.OnPropertyChanged(nameof(_viewModel.ProgressIndeterminate));
+ }
+ }
+
+ public int ProgressMaximum
+ {
+ get => _viewModel.ProgressMaximum;
+ set
+ {
+ _viewModel.ProgressMaximum = value;
+ _viewModel.OnPropertyChanged(nameof(_viewModel.ProgressMaximum));
+ }
+ }
+
+ public int ProgressValue
+ {
+ get => _viewModel.ProgressValue;
+ set
+ {
+ _viewModel.ProgressValue = value;
+ _viewModel.OnPropertyChanged(nameof(_viewModel.ProgressValue));
+ }
+ }
+
+ public bool CancelEnabled
+ {
+ get => _viewModel.CancelEnabled;
+ set
+ {
+ _viewModel.CancelEnabled = value;
+
+ _viewModel.OnPropertyChanged(nameof(_viewModel.CancelButtonVisibility));
+ _viewModel.OnPropertyChanged(nameof(_viewModel.CancelEnabled));
+ }
+ }
+ #endregion
+
+ public ProgressFluentDialog()
+ {
+ InitializeComponent();
+ ApplyTheme();
+
+ _viewModel = new FluentDialogViewModel(this);
+ DataContext = _viewModel;
+ Title = App.Settings.Prop.BootstrapperTitle;
+ Icon = App.Settings.Prop.BootstrapperIcon.GetIcon().GetImageSource();
+ }
+
+ private void UiWindow_Closing(object sender, CancelEventArgs e)
+ {
+ if (!_isClosing)
+ Bootstrapper?.CancelInstall();
+ }
+
+ #region IBootstrapperDialog Methods
+ public void ShowBootstrapper() => this.ShowDialog();
+
+ public void CloseBootstrapper()
+ {
+ _isClosing = true;
+ Dispatcher.BeginInvoke(this.Close);
+ }
+
+ public void ShowSuccess(string message, Action? callback) => BaseFunctions.ShowSuccess(message, callback);
+ #endregion
+ }
+}
\ No newline at end of file
diff --git a/Bloxstrap/UI/Frontend.cs b/Bloxstrap/UI/Frontend.cs
index bce2d8a..d151115 100644
--- a/Bloxstrap/UI/Frontend.cs
+++ b/Bloxstrap/UI/Frontend.cs
@@ -57,6 +57,7 @@ namespace Bloxstrap.UI
BootstrapperStyle.ProgressDialog => new ProgressDialog(),
BootstrapperStyle.FluentDialog => new FluentDialog(),
BootstrapperStyle.ByfronDialog => new ByfronDialog(),
+ BootstrapperStyle.ProgressFluentDialog => new ProgressFluentDialog(),
_ => new FluentDialog()
};
}
diff --git a/Bloxstrap/UI/ViewModels/Bootstrapper/BootstrapperDialogViewModel.cs b/Bloxstrap/UI/ViewModels/Bootstrapper/BootstrapperDialogViewModel.cs
index 2a5c523..27e21da 100644
--- a/Bloxstrap/UI/ViewModels/Bootstrapper/BootstrapperDialogViewModel.cs
+++ b/Bloxstrap/UI/ViewModels/Bootstrapper/BootstrapperDialogViewModel.cs
@@ -22,6 +22,12 @@ namespace Bloxstrap.UI.ViewModels.Bootstrapper
public bool CancelEnabled { get; set; } = false;
public Visibility CancelButtonVisibility => CancelEnabled ? Visibility.Visible : Visibility.Collapsed;
+ [Obsolete("Do not use this! This is for the designer only.", true)]
+ public BootstrapperDialogViewModel()
+ {
+ _dialog = null!;
+ }
+
public BootstrapperDialogViewModel(IBootstrapperDialog dialog)
{
_dialog = dialog;