wabbajack/Wabbajack.App.Blazor/MainWindow.xaml.cs

27 lines
761 B
C#
Raw Normal View History

2022-01-09 13:33:22 +00:00
using System;
2022-01-21 04:57:59 +00:00
using Wabbajack.App.Blazor.State;
2022-01-09 13:33:22 +00:00
2022-01-20 08:34:38 +00:00
namespace Wabbajack.App.Blazor;
public partial class MainWindow
2022-01-09 13:33:22 +00:00
{
2022-01-21 13:54:22 +00:00
public MainWindow(IServiceProvider serviceProvider, IStateContainer stateContainer)
2022-01-09 13:33:22 +00:00
{
2022-01-21 13:54:22 +00:00
stateContainer.TaskBarStateObservable.Subscribe(state =>
2022-01-21 04:57:59 +00:00
{
Dispatcher.InvokeAsync(() =>
{
TaskBarItem.Description = state.Description;
TaskBarItem.ProgressState = state.State;
TaskBarItem.ProgressValue = state.ProgressValue;
});
2022-01-21 13:41:37 +00:00
});
2022-01-20 08:34:38 +00:00
InitializeComponent();
BlazorWebView.Services = serviceProvider;
2022-01-09 13:33:22 +00:00
}
}
2022-01-20 08:34:38 +00:00
// Required so compiler doesn't complain about not finding the type. [MC3050]
public partial class Main { }