mirror of
https://github.com/bloxstraplabs/bloxstrap.git
synced 2025-04-22 10:31:26 -07:00
40 lines
1.0 KiB
C#
40 lines
1.0 KiB
C#
using System.Windows;
|
|
using System.Windows.Controls;
|
|
|
|
using Bloxstrap.UI.ViewModels.Installer;
|
|
|
|
namespace Bloxstrap.UI.Elements.Installer.Pages
|
|
{
|
|
/// <summary>
|
|
/// Interaction logic for WelcomePage.xaml
|
|
/// </summary>
|
|
public partial class InstallPage
|
|
{
|
|
private readonly InstallViewModel _viewModel = new();
|
|
|
|
public InstallPage()
|
|
{
|
|
DataContext = _viewModel;
|
|
|
|
_viewModel.SetCanContinueEvent += (_, state) =>
|
|
{
|
|
if (Window.GetWindow(this) is MainWindow window)
|
|
window.SetButtonEnabled("next", state);
|
|
};
|
|
|
|
InitializeComponent();
|
|
}
|
|
|
|
private void UiPage_Loaded(object sender, RoutedEventArgs e)
|
|
{
|
|
if (Window.GetWindow(this) is MainWindow window)
|
|
{
|
|
window.SetNextButtonText(Strings.Common_Navigation_Install);
|
|
window.NextPageCallback += NextPageCallback;
|
|
}
|
|
}
|
|
|
|
public bool NextPageCallback() => _viewModel.DoInstall();
|
|
}
|
|
}
|