mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
da4865dc7e
Was too dangerous to have next to minimize
48 lines
1.4 KiB
C#
48 lines
1.4 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Diagnostics;
|
|
using System.IO;
|
|
using System.Linq;
|
|
using System.Reflection;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows.Input;
|
|
using ReactiveUI;
|
|
using Wabbajack.Lib;
|
|
|
|
namespace Wabbajack
|
|
{
|
|
public class SettingsVM : BackNavigatingVM
|
|
{
|
|
public MainWindowVM MWVM { get; }
|
|
public LoginManagerVM Login { get; }
|
|
public PerformanceSettings Performance { get; }
|
|
public FiltersSettings Filters { get; }
|
|
public AuthorFilesVM AuthorFile { get; }
|
|
|
|
public ICommand OpenTerminalCommand { get; }
|
|
|
|
public SettingsVM(MainWindowVM mainWindowVM)
|
|
: base(mainWindowVM)
|
|
{
|
|
MWVM = mainWindowVM;
|
|
Login = new LoginManagerVM(this);
|
|
Performance = mainWindowVM.Settings.Performance;
|
|
AuthorFile = new AuthorFilesVM(this);
|
|
Filters = mainWindowVM.Settings.Filters;
|
|
OpenTerminalCommand = ReactiveCommand.CreateFromTask(() => OpenTerminal());
|
|
}
|
|
|
|
private async Task OpenTerminal()
|
|
{
|
|
var process = new ProcessStartInfo
|
|
{
|
|
FileName = "cmd.exe",
|
|
WorkingDirectory = Path.GetDirectoryName(Assembly.GetEntryAssembly().Location)
|
|
};
|
|
Process.Start(process);
|
|
await MWVM.ShutdownApplication();
|
|
}
|
|
}
|
|
}
|