2022-03-13 22:47:30 +00:00
|
|
|
|
using System;
|
2023-10-12 18:33:06 +00:00
|
|
|
|
using System.Reactive.Disposables;
|
2022-03-13 22:47:30 +00:00
|
|
|
|
using ReactiveUI;
|
2022-08-17 22:26:08 +00:00
|
|
|
|
using Wabbajack.Paths.IO;
|
2022-03-13 22:47:30 +00:00
|
|
|
|
|
|
|
|
|
namespace Wabbajack
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Interaction logic for PerformanceSettingsView.xaml
|
|
|
|
|
/// </summary>
|
|
|
|
|
public partial class PerformanceSettingsView : ReactiveUserControl<PerformanceSettings>
|
|
|
|
|
{
|
|
|
|
|
public PerformanceSettingsView()
|
|
|
|
|
{
|
|
|
|
|
InitializeComponent();
|
|
|
|
|
|
|
|
|
|
this.WhenActivated(disposable =>
|
|
|
|
|
{
|
2023-10-12 18:33:06 +00:00
|
|
|
|
this.BindStrict(
|
|
|
|
|
ViewModel,
|
|
|
|
|
x => x.MaximumMemoryPerDownloadThreadMb,
|
|
|
|
|
x => x.MaximumMemoryPerDownloadThreadIntegerUpDown.Value)
|
|
|
|
|
.DisposeWith(disposable);
|
2022-08-17 22:26:08 +00:00
|
|
|
|
this.EditResourceSettings.Command = ReactiveCommand.Create(() =>
|
|
|
|
|
{
|
|
|
|
|
UIUtils.OpenFile(
|
|
|
|
|
KnownFolders.WabbajackAppLocal.Combine("saved_settings", "resource_settings.json"));
|
|
|
|
|
Environment.Exit(0);
|
|
|
|
|
});
|
2023-10-12 18:33:06 +00:00
|
|
|
|
ResetMaximumMemoryPerDownloadThread.Command = ReactiveCommand.Create(() =>
|
|
|
|
|
{
|
|
|
|
|
ViewModel.ResetMaximumMemoryPerDownloadThreadMb();
|
|
|
|
|
});
|
2022-03-13 22:47:30 +00:00
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|