mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
19 errors, woot
This commit is contained in:
parent
f49083f0c2
commit
c4f4f8889a
@ -1,6 +1,11 @@
|
||||
using System.Windows.Input;
|
||||
|
||||
namespace Wabbajack;
|
||||
|
||||
public interface INeedsLogin
|
||||
{
|
||||
|
||||
string SiteName { get; }
|
||||
ICommand TriggerLogin { get; set; }
|
||||
ICommand ClearLogin { get; set; }
|
||||
object? IconUri { get; set; }
|
||||
}
|
@ -54,13 +54,12 @@ namespace Wabbajack
|
||||
[Reactive]
|
||||
public bool UpdateAvailable { get; private set; }
|
||||
|
||||
public MainWindowVM(ILogger<MainWindowVM> logger, MainWindow mainWindow, MainSettings settings, Client wjClient,
|
||||
public MainWindowVM(ILogger<MainWindowVM> logger, MainSettings settings, Client wjClient,
|
||||
ServiceProvider serviceProvider)
|
||||
{
|
||||
_logger = logger;
|
||||
_wjClient = wjClient;
|
||||
ConverterRegistration.Register();
|
||||
MainWindow = mainWindow;
|
||||
Settings = settings;
|
||||
Installer = new Lazy<InstallerVM>(() => new InstallerVM(serviceProvider.GetService<ILogger<InstallerVM>>(), this, serviceProvider));
|
||||
Compiler = new Lazy<CompilerVM>(() => new CompilerVM(serviceProvider.GetService<ILogger<CompilerVM>>(), this));
|
||||
@ -189,6 +188,7 @@ namespace Wabbajack
|
||||
|
||||
public async Task ShutdownApplication()
|
||||
{
|
||||
/*
|
||||
Dispose();
|
||||
Settings.PosX = MainWindow.Left;
|
||||
Settings.PosY = MainWindow.Top;
|
||||
@ -196,6 +196,7 @@ namespace Wabbajack
|
||||
Settings.Height = MainWindow.Height;
|
||||
await MainSettings.SaveSettings(Settings);
|
||||
Application.Current.Shutdown();
|
||||
*/
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -60,12 +60,13 @@ namespace Wabbajack
|
||||
LoginWithCredentials = loginWithCredentials;
|
||||
}
|
||||
|
||||
/*
|
||||
_metaInfo = (login.MetaInfo ?? Observable.Return(""))
|
||||
.ToGuiProperty(this, nameof(MetaInfo));
|
||||
.ToGuiProperty(this, nameof(MetaInfo));*/
|
||||
|
||||
if (!UsesCredentials)
|
||||
return;
|
||||
|
||||
/*
|
||||
TriggerCredentialsLogin = ReactiveCommand.Create(() =>
|
||||
{
|
||||
if (!(login is INeedsLoginCredentials))
|
||||
@ -74,10 +75,12 @@ namespace Wabbajack
|
||||
var loginWindow = new LoginWindowView(LoginWithCredentials);
|
||||
loginWindow.Show();
|
||||
}, LoginWithCredentials.IsLoggedIn.Select(b => !b).ObserveOnGuiThread());
|
||||
*/
|
||||
}
|
||||
|
||||
private void LoadImage()
|
||||
{
|
||||
/*
|
||||
Task.Run(async () =>
|
||||
{
|
||||
if (Login.IconUri == null) return;
|
||||
@ -139,6 +142,7 @@ namespace Wabbajack
|
||||
Favicon = source;
|
||||
}
|
||||
});
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -22,8 +22,11 @@ namespace Wabbajack
|
||||
private readonly ILogger<MainWindow> _logger;
|
||||
private readonly SystemParametersConstructor _systemParams;
|
||||
|
||||
public MainWindow(ILogger<MainWindow> logger, SystemParametersConstructor systemParams, LauncherUpdater updater)
|
||||
public MainWindow(ILogger<MainWindow> logger, SystemParametersConstructor systemParams, LauncherUpdater updater, MainWindowVM vm)
|
||||
{
|
||||
_mwvm = vm;
|
||||
DataContext = _mwvm;
|
||||
|
||||
_logger = logger;
|
||||
_systemParams = systemParams;
|
||||
try
|
||||
@ -69,10 +72,7 @@ namespace Wabbajack
|
||||
_settings = settings;
|
||||
RunWhenLoaded(LoadSettings);
|
||||
}*/
|
||||
|
||||
// Set datacontext
|
||||
_mwvm = new MainWindowVM(this, _settings);
|
||||
DataContext = _mwvm;
|
||||
|
||||
|
||||
// Bring window to the front if it isn't already
|
||||
this.Initialized += (s, e) =>
|
||||
|
Loading…
Reference in New Issue
Block a user