mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
38 lines
1.2 KiB
C#
38 lines
1.2 KiB
C#
using System;
|
|
using System.Reactive.Disposables;
|
|
using ReactiveUI;
|
|
using Wabbajack.Paths.IO;
|
|
|
|
namespace Wabbajack
|
|
{
|
|
/// <summary>
|
|
/// Interaction logic for PerformanceSettingsView.xaml
|
|
/// </summary>
|
|
public partial class PerformanceSettingsView : ReactiveUserControl<PerformanceSettings>
|
|
{
|
|
public PerformanceSettingsView()
|
|
{
|
|
InitializeComponent();
|
|
|
|
this.WhenActivated(disposable =>
|
|
{
|
|
this.BindStrict(
|
|
ViewModel,
|
|
x => x.MaximumMemoryPerDownloadThreadMb,
|
|
x => x.MaximumMemoryPerDownloadThreadIntegerUpDown.Value)
|
|
.DisposeWith(disposable);
|
|
this.EditResourceSettings.Command = ReactiveCommand.Create(() =>
|
|
{
|
|
UIUtils.OpenFile(
|
|
KnownFolders.WabbajackAppLocal.Combine("saved_settings", "resource_settings.json"));
|
|
Environment.Exit(0);
|
|
});
|
|
ResetMaximumMemoryPerDownloadThread.Command = ReactiveCommand.Create(() =>
|
|
{
|
|
ViewModel.ResetMaximumMemoryPerDownloadThreadMb();
|
|
});
|
|
});
|
|
}
|
|
}
|
|
}
|