Files

36 lines
982 B
C#
Raw Permalink Normal View History

using System.Windows;
using EngineeringSync.Setup.ViewModels;
using Microsoft.Win32;
namespace EngineeringSync.Setup.Views.Pages;
public partial class InstallPathPage : WizardPageBase
{
public InstallPathPage(WizardViewModel wizard) : base(wizard)
{
InitializeComponent();
}
private void Browse_Click(object sender, RoutedEventArgs e)
{
var dlg = new OpenFolderDialog
{
Title = "Installationsverzeichnis auswählen",
InitialDirectory = Wizard.State.InstallPath
};
if (dlg.ShowDialog() == true)
Wizard.State.InstallPath = dlg.FolderName;
}
public override bool Validate()
{
if (string.IsNullOrWhiteSpace(Wizard.State.InstallPath))
{
MessageBox.Show("Bitte wählen Sie ein Installationsverzeichnis.",
"Validierung", MessageBoxButton.OK, MessageBoxImage.Warning);
return false;
}
return true;
}
}