Files
MesenCE/UI/Views/PreferencesConfigView.axaml.cs
SourMesen 40335ce735 UI: Update to Avalonia 12, .NET 10 and replace ReactiveUI with MVVM community toolkit (#142)
Also fixes DX11.0 support (for Win7 PCs that aren't fully updated), which stopped working after the recent variable refresh rate changes
2026-07-03 16:04:42 +09:00

51 lines
1.1 KiB
C#

using Avalonia;
using Avalonia.Controls;
using Avalonia.Interactivity;
using Avalonia.Markup.Xaml;
using Avalonia.Markup.Xaml.Styling;
using Avalonia.Styling;
using Avalonia.Themes.Fluent;
using Avalonia.VisualTree;
using Mesen.Config;
using Mesen.Controls;
using Mesen.Interop;
using Mesen.Utilities;
using Mesen.Windows;
using System.Collections.Generic;
namespace Mesen.Views
{
public class PreferencesConfigView : UserControl
{
public PreferencesConfigView()
{
InitializeComponent();
}
private void InitializeComponent()
{
AvaloniaXamlLoader.Load(this);
}
private void BtnResetLagCounter_OnClick(object sender, RoutedEventArgs e)
{
InputApi.ResetLagCounter();
}
private void BtnChangeStorageFolder_OnClick(object sender, RoutedEventArgs e)
{
ShowSelectFolderWindow();
}
private async void ShowSelectFolderWindow()
{
SelectStorageFolderWindow wnd = new();
if(await wnd.ShowCenteredDialog<bool>(this.GetWindow())) {
this.GetWindow()?.Close();
ApplicationHelper.GetMainWindow()?.Close();
ConfigManager.RestartMesen();
}
}
}
}