2021-12-26 21:56:44 +00:00
|
|
|
|
using ReactiveUI;
|
|
|
|
|
using ReactiveUI.Fody.Helpers;
|
|
|
|
|
using System;
|
|
|
|
|
using System.IO;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Reactive;
|
|
|
|
|
using System.Reactive.Linq;
|
|
|
|
|
using System.Windows.Input;
|
|
|
|
|
using Wabbajack.Common;
|
2021-12-30 00:15:37 +00:00
|
|
|
|
using Wabbajack;
|
2021-12-29 17:26:12 +00:00
|
|
|
|
using Wabbajack.Messages;
|
2021-12-27 05:18:52 +00:00
|
|
|
|
using Wabbajack.Paths.IO;
|
2021-12-26 21:56:44 +00:00
|
|
|
|
|
|
|
|
|
namespace Wabbajack
|
|
|
|
|
{
|
|
|
|
|
public class ModeSelectionVM : ViewModel
|
|
|
|
|
{
|
|
|
|
|
private MainWindowVM _mainVM;
|
|
|
|
|
public ICommand BrowseCommand { get; }
|
|
|
|
|
public ICommand InstallCommand { get; }
|
|
|
|
|
public ICommand CompileCommand { get; }
|
2021-12-31 00:18:20 +00:00
|
|
|
|
|
2021-12-26 21:56:44 +00:00
|
|
|
|
public ReactiveCommand<Unit, Unit> UpdateCommand { get; }
|
|
|
|
|
|
2021-12-29 17:26:12 +00:00
|
|
|
|
public ModeSelectionVM()
|
2021-12-26 21:56:44 +00:00
|
|
|
|
{
|
2021-12-31 00:18:20 +00:00
|
|
|
|
InstallCommand = ReactiveCommand.Create(() =>
|
|
|
|
|
{
|
|
|
|
|
LoadLastLoadedModlist.Send();
|
|
|
|
|
NavigateToGlobal.Send(NavigateToGlobal.ScreenType.Installer);
|
|
|
|
|
});
|
2021-12-29 17:26:12 +00:00
|
|
|
|
CompileCommand = ReactiveCommand.Create(() => NavigateToGlobal.Send(NavigateToGlobal.ScreenType.Compiler));
|
|
|
|
|
BrowseCommand = ReactiveCommand.Create(() => NavigateToGlobal.Send(NavigateToGlobal.ScreenType.ModListGallery));
|
2021-12-26 21:56:44 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|