wabbajack/Wabbajack.App.Blazor/Pages/Install/Select.razor.cs
Unnoen 47ffa30222
Restructure installing stage into three pages. Changed some design.
Added getBlobUrlFromStream JavaScript function so we can reuse the URL.
2022-01-27 18:55:07 +11:00

27 lines
863 B
C#

using Microsoft.AspNetCore.Components;
using Microsoft.WindowsAPICodePack.Dialogs;
using Wabbajack.App.Blazor.State;
using Wabbajack.Common;
using Wabbajack.Paths;
namespace Wabbajack.App.Blazor.Pages;
public partial class Select
{
[Inject] private NavigationManager NavigationManager { get; set; } = default!;
[Inject] private IStateContainer StateContainer { get; set; } = default!;
private void SelectFile()
{
using (var dialog = new CommonOpenFileDialog())
{
dialog.Multiselect = false;
dialog.Filters.Add(new CommonFileDialogFilter("Wabbajack File", "*" + Ext.Wabbajack));
if (dialog.ShowDialog() != CommonFileDialogResult.Ok) return;
StateContainer.ModlistPath = dialog.FileName.ToAbsolutePath();
}
NavigationManager.NavigateTo(Configure.Route);
}
}