Move around VMs + Make most settings reactive

This commit is contained in:
Isaac Marovitz 2024-04-19 13:29:53 -04:00
parent c628cd7af5
commit 2281b3b59e
No known key found for this signature in database
GPG Key ID: 97250B2B09A132E1
23 changed files with 390 additions and 89 deletions

View File

@ -1,5 +1,6 @@
using Avalonia.Svg.Skia;
using Ryujinx.Ava.UI.Models.Input;
using Ryujinx.Ava.UI.ViewModels.Settings;
using Ryujinx.Ava.UI.Views.Input;
namespace Ryujinx.Ava.UI.ViewModels.Input
@ -54,9 +55,9 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
}
}
public readonly InputViewModel ParentModel;
public readonly SettingsInputViewModel ParentModel;
public ControllerInputViewModel(InputViewModel model, GamepadInputConfig config)
public ControllerInputViewModel(SettingsInputViewModel model, GamepadInputConfig config)
{
ParentModel = model;
model.NotifyChangesEvent += OnParentModelChanged;

View File

@ -1,5 +1,6 @@
using Avalonia.Svg.Skia;
using Ryujinx.Ava.UI.Models.Input;
using Ryujinx.Ava.UI.ViewModels.Settings;
namespace Ryujinx.Ava.UI.ViewModels.Input
{
@ -53,9 +54,9 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
}
}
public readonly InputViewModel ParentModel;
public readonly SettingsInputViewModel ParentModel;
public KeyboardInputViewModel(InputViewModel model, KeyboardInputConfig config)
public KeyboardInputViewModel(SettingsInputViewModel model, KeyboardInputConfig config)
{
ParentModel = model;
model.NotifyChangesEvent += OnParentModelChanged;

View File

@ -9,6 +9,7 @@ using Ryujinx.Ava.Input;
using Ryujinx.Ava.UI.Helpers;
using Ryujinx.Ava.UI.Models;
using Ryujinx.Ava.UI.Models.Input;
using Ryujinx.Ava.UI.ViewModels.Input;
using Ryujinx.Ava.UI.Windows;
using Ryujinx.Common;
using Ryujinx.Common.Configuration;
@ -30,9 +31,9 @@ using ConfigGamepadInputId = Ryujinx.Common.Configuration.Hid.Controller.Gamepad
using ConfigStickInputId = Ryujinx.Common.Configuration.Hid.Controller.StickInputId;
using Key = Ryujinx.Common.Configuration.Hid.Key;
namespace Ryujinx.Ava.UI.ViewModels.Input
namespace Ryujinx.Ava.UI.ViewModels.Settings
{
public class InputViewModel : BaseModel, IDisposable
public class SettingsInputViewModel : BaseModel, IDisposable
{
private const string Disabled = "disabled";
private const string ProControllerResource = "Ryujinx.UI.Common/Resources/Controller_ProCon.svg";
@ -102,12 +103,6 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
get => _playerId;
set
{
if (SettingsViewModel.IsModified)
{
return;
}
SettingsViewModel.IsModified = false;
_playerId = value;
if (!Enum.IsDefined(typeof(PlayerIndex), _playerId))
@ -244,7 +239,7 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
public InputConfig Config { get; set; }
public InputViewModel(UserControl owner, SettingsViewModel settingsViewModel) : this()
public SettingsInputViewModel(UserControl owner, SettingsViewModel settingsViewModel) : this()
{
SettingsViewModel = settingsViewModel;
@ -269,7 +264,7 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
}
}
public InputViewModel()
public SettingsInputViewModel()
{
PlayerIndexes = new ObservableCollection<PlayerModel>();
Controllers = new ObservableCollection<ControllerModel>();

View File

@ -5,6 +5,7 @@ using LibHac.Tools.FsSystem;
using Ryujinx.Audio.Backends.OpenAL;
using Ryujinx.Audio.Backends.SDL2;
using Ryujinx.Audio.Backends.SoundIo;
using Ryujinx.Ava;
using Ryujinx.Ava.Common.Locale;
using Ryujinx.Ava.UI.Helpers;
using Ryujinx.Ava.UI.Models.Input;
@ -27,7 +28,7 @@ using System.Runtime.InteropServices;
using System.Threading.Tasks;
using TimeZone = Ryujinx.Ava.UI.Models.TimeZone;
namespace Ryujinx.Ava.UI.ViewModels
namespace Ryujinx.Ava.UI.ViewModels.Settings
{
public class SettingsViewModel : BaseModel
{
@ -57,7 +58,7 @@ namespace Ryujinx.Ava.UI.ViewModels
public bool IsModified
{
get => _isModified;
set
private set
{
DirtyEvent?.Invoke(value);
_isModified = value;
@ -142,31 +143,261 @@ namespace Ryujinx.Ava.UI.ViewModels
public bool IsMacOS => OperatingSystem.IsMacOS();
public bool EnableDiscordIntegration { get; set; }
public bool CheckUpdatesOnStart { get; set; }
public bool ShowConfirmExit { get; set; }
public bool RememberWindowState { get; set; }
public int HideCursor { get; set; }
public bool EnableVsync { get; set; }
public bool EnablePptc { get; set; }
public bool EnableInternetAccess { get; set; }
public bool EnableFsIntegrityChecks { get; set; }
public bool IgnoreMissingServices { get; set; }
public bool ExpandDramSize { get; set; }
public bool EnableShaderCache { get; set; }
public bool EnableTextureRecompression { get; set; }
public bool EnableMacroHLE { get; set; }
public bool EnableColorSpacePassthrough { get; set; }
private bool _enableDiscordIntegration;
public bool EnableDiscordIntegration
{
get => _enableDiscordIntegration;
set
{
_enableDiscordIntegration = value;
CheckIfModified();
}
}
private bool _checkUpdatesOnStart;
public bool CheckUpdatesOnStart
{
get => _checkUpdatesOnStart;
set
{
_checkUpdatesOnStart = value;
CheckIfModified();
}
}
private bool _showConfirmExit;
public bool ShowConfirmExit
{
get => _showConfirmExit;
set
{
_showConfirmExit = value;
CheckIfModified();
}
}
private int _hideCursor;
public int HideCursor
{
get => _hideCursor;
set
{
_hideCursor = value;
CheckIfModified();
}
}
private bool _enableVsync;
public bool EnableVsync
{
get => _enableVsync;
set
{
_enableVsync = value;
CheckIfModified();
}
}
private bool _enablePptc;
public bool EnablePptc
{
get => _enablePptc;
set
{
_enablePptc = value;
CheckIfModified();
}
}
private bool _enableInternetAccess;
public bool EnableInternetAccess
{
get => _enableInternetAccess;
set
{
_enableInternetAccess = value;
CheckIfModified();
}
}
private bool _enableFsIntegrityChecks;
public bool EnableFsIntegrityChecks
{
get => _enableFsIntegrityChecks;
set
{
_enableFsIntegrityChecks = value;
CheckIfModified();
}
}
private bool _ignoreMissingServices;
public bool IgnoreMissingServices
{
get => _ignoreMissingServices;
set
{
_ignoreMissingServices = value;
CheckIfModified();
}
}
private bool _expandedDramSize;
public bool ExpandDramSize
{
get => _expandedDramSize;
set
{
_expandedDramSize = value;
CheckIfModified();
}
}
private bool _enableShaderCache;
public bool EnableShaderCache
{
get => _enableShaderCache;
set
{
_enableShaderCache = value;
CheckIfModified();
}
}
private bool _enableTextureRecompression;
public bool EnableTextureRecompression
{
get => _enableTextureRecompression;
set
{
_enableTextureRecompression = value;
CheckIfModified();
}
}
private bool _enableMacroHLE;
public bool EnableMacroHLE
{
get => _enableMacroHLE;
set
{
_enableMacroHLE = value;
CheckIfModified();
}
}
private bool _enableColorSpacePassthrough;
public bool EnableColorSpacePassthrough
{
get => _enableColorSpacePassthrough;
set
{
_enableColorSpacePassthrough = value;
CheckIfModified();
}
}
public bool ColorSpacePassthroughAvailable => IsMacOS;
public bool EnableFileLog { get; set; }
public bool EnableStub { get; set; }
public bool EnableInfo { get; set; }
public bool EnableWarn { get; set; }
public bool EnableError { get; set; }
public bool EnableTrace { get; set; }
public bool EnableGuest { get; set; }
public bool EnableFsAccessLog { get; set; }
public bool EnableDebug { get; set; }
private bool _enableFileLog;
public bool EnableFileLog
{
get => _enableFileLog;
set
{
_enableFileLog = value;
CheckIfModified();
}
}
private bool _enableStub;
public bool EnableStub
{
get => _enableStub;
set
{
_enableStub = value;
CheckIfModified();
}
}
private bool _enableInfo;
public bool EnableInfo
{
get => _enableInfo;
set
{
_enableInfo = value;
CheckIfModified();
}
}
private bool _enableWarn;
public bool EnableWarn
{
get => _enableWarn;
set
{
_enableWarn = value;
CheckIfModified();
}
}
private bool _enableError;
public bool EnableError
{
get => _enableError;
set
{
_enableError = value;
CheckIfModified();
}
}
private bool _enableTrace;
public bool EnableTrace
{
get => _enableTrace;
set
{
_enableTrace = value;
CheckIfModified();
}
}
private bool _enableGuest;
public bool EnableGuest
{
get => _enableGuest;
set
{
_enableGuest = value;
CheckIfModified();
}
}
private bool _enableFsAccessLog;
public bool EnableFsAccessLog
{
get => _enableFsAccessLog;
set
{
_enableFsAccessLog = value;
CheckIfModified();
}
}
private bool _enableDebug;
public bool EnableDebug
{
get => _enableDebug;
set
{
_enableDebug = value;
CheckIfModified();
}
}
public bool IsOpenAlEnabled { get; set; }
public bool IsSoundIoEnabled { get; set; }
public bool IsSDL2Enabled { get; set; }
@ -298,6 +529,93 @@ namespace Ryujinx.Ava.UI.ViewModels
}
}
public void CheckIfModified()
{
bool isDirty = false;
ConfigurationState config = ConfigurationState.Instance;
isDirty |= config.EnableDiscordIntegration.Value != EnableDiscordIntegration;
isDirty |= config.CheckUpdatesOnStart.Value != CheckUpdatesOnStart;
isDirty |= config.ShowConfirmExit.Value != ShowConfirmExit;
isDirty |= config.HideCursor.Value != (HideCursorMode)HideCursor;
// isDirty |= config.UI.GameDirs.Value != GameDirectories.ToList();
isDirty |= config.UI.BaseStyle.Value != (BaseStyleIndex == 0 ? "Light" : "Dark");
// Keyboard Hotkeys
// isDirty |= config.Hid.Hotkeys.Value != KeyboardHotkey.GetConfig();
// System
isDirty |= config.System.Region.Value != (Region)Region;
isDirty |= config.System.Language.Value != (Language)Language;
if (_validTzRegions.Contains(TimeZone))
{
isDirty |= config.System.TimeZone.Value != TimeZone;
}
// isDirty |= config.System.SystemTimeOffset.Value != Convert.ToInt64((CurrentDate.ToUnixTimeSeconds() + CurrentTime.TotalSeconds) - DateTimeOffset.Now.ToUnixTimeSeconds());
isDirty |= config.Graphics.EnableVsync.Value != EnableVsync;
isDirty |= config.System.EnableFsIntegrityChecks.Value != EnableFsIntegrityChecks;
isDirty |= config.System.ExpandRam.Value != ExpandDramSize;
isDirty |= config.System.IgnoreMissingServices.Value != IgnoreMissingServices;
// CPU
isDirty |= config.System.EnablePtc.Value != EnablePptc;
isDirty |= config.System.MemoryManagerMode.Value != (MemoryManagerMode)MemoryMode;
isDirty |= config.System.UseHypervisor.Value != UseHypervisor;
// Graphics
isDirty |= config.Graphics.GraphicsBackend.Value != (GraphicsBackend)GraphicsBackendIndex;
isDirty |= config.Graphics.PreferredGpu.Value != _gpuIds.ElementAtOrDefault(PreferredGpuIndex);
isDirty |= config.Graphics.EnableShaderCache.Value != EnableShaderCache;
isDirty |= config.Graphics.EnableTextureRecompression.Value != EnableTextureRecompression;
isDirty |= config.Graphics.EnableMacroHLE.Value != EnableMacroHLE;
isDirty |= config.Graphics.EnableColorSpacePassthrough.Value != EnableColorSpacePassthrough;
isDirty |= config.Graphics.ResScale.Value != (ResolutionScale == 4 ? -1 : ResolutionScale + 1);
isDirty |= config.Graphics.ResScaleCustom.Value != CustomResolutionScale;
isDirty |= config.Graphics.MaxAnisotropy.Value != (MaxAnisotropy == 0 ? -1 : MathF.Pow(2, MaxAnisotropy));
isDirty |= config.Graphics.AspectRatio.Value != (AspectRatio)AspectRatio;
isDirty |= config.Graphics.AntiAliasing.Value != (AntiAliasing)AntiAliasingEffect;
isDirty |= config.Graphics.ScalingFilter.Value != (ScalingFilter)ScalingFilter;
isDirty |= config.Graphics.ScalingFilterLevel.Value != ScalingFilterLevel;
if (ConfigurationState.Instance.Graphics.BackendThreading != (BackendThreading)GraphicsBackendMultithreadingIndex)
{
DriverUtilities.ToggleOGLThreading(GraphicsBackendMultithreadingIndex == (int)BackendThreading.Off);
}
isDirty |= config.Graphics.BackendThreading.Value != (BackendThreading)GraphicsBackendMultithreadingIndex;
isDirty |= config.Graphics.ShadersDumpPath.Value != ShaderDumpPath;
// Audio
isDirty |= config.System.AudioBackend.Value != (AudioBackend)AudioBackend;
isDirty |= config.System.AudioVolume.Value != Volume / 100;
// Network
isDirty |= config.System.EnableInternetAccess.Value != EnableInternetAccess;
// Logging
isDirty |= config.Logger.EnableFileLog.Value != EnableFileLog;
isDirty |= config.Logger.EnableStub.Value != EnableStub;
isDirty |= config.Logger.EnableInfo.Value != EnableInfo;
isDirty |= config.Logger.EnableWarn.Value != EnableWarn;
isDirty |= config.Logger.EnableError.Value != EnableError;
isDirty |= config.Logger.EnableTrace.Value != EnableTrace;
isDirty |= config.Logger.EnableGuest.Value != EnableGuest;
isDirty |= config.Logger.EnableDebug.Value != EnableDebug;
isDirty |= config.Logger.EnableFsAccessLog.Value != EnableFsAccessLog;
isDirty |= config.System.FsGlobalAccessLogMode.Value != FsGlobalAccessLogMode;
isDirty |= config.Logger.GraphicsDebugLevel.Value != (GraphicsDebugLevel)OpenglDebugLevel;
isDirty |= config.Multiplayer.LanInterfaceId.Value != _networkInterfaces[NetworkInterfaceList[NetworkInterfaceIndex]];
isDirty |= config.Multiplayer.Mode.Value != (MultiplayerMode)MultiplayerModeIndex;
IsModified = isDirty;
}
public async Task CheckSoundBackends()
{
IsOpenAlEnabled = OpenALHardwareDeviceDriver.IsSupported;
@ -402,19 +720,12 @@ namespace Ryujinx.Ava.UI.ViewModels
EnableDiscordIntegration = config.EnableDiscordIntegration;
CheckUpdatesOnStart = config.CheckUpdatesOnStart;
ShowConfirmExit = config.ShowConfirmExit;
RememberWindowState = config.RememberWindowState;
HideCursor = (int)config.HideCursor.Value;
GameDirectories.Clear();
GameDirectories.AddRange(config.UI.GameDirs.Value);
BaseStyleIndex = config.UI.BaseStyle.Value switch
{
"Auto" => 0,
"Light" => 1,
"Dark" => 2,
_ => 0
};
BaseStyleIndex = config.UI.BaseStyle == "Light" ? 0 : 1;
// Keyboard Hotkeys
KeyboardHotkey = new HotkeyConfig(config.Hid.Hotkeys.Value);
@ -424,11 +735,10 @@ namespace Ryujinx.Ava.UI.ViewModels
Language = (int)config.System.Language.Value;
TimeZone = config.System.TimeZone;
DateTime currentHostDateTime = DateTime.Now;
TimeSpan systemDateTimeOffset = TimeSpan.FromSeconds(config.System.SystemTimeOffset);
DateTime currentDateTime = currentHostDateTime.Add(systemDateTimeOffset);
DateTime currentDateTime = DateTime.Now;
CurrentDate = currentDateTime.Date;
CurrentTime = currentDateTime.TimeOfDay;
CurrentTime = currentDateTime.TimeOfDay.Add(TimeSpan.FromSeconds(config.System.SystemTimeOffset));
EnableVsync = config.Graphics.EnableVsync;
EnableFsIntegrityChecks = config.System.EnableFsIntegrityChecks;
@ -489,7 +799,6 @@ namespace Ryujinx.Ava.UI.ViewModels
config.EnableDiscordIntegration.Value = EnableDiscordIntegration;
config.CheckUpdatesOnStart.Value = CheckUpdatesOnStart;
config.ShowConfirmExit.Value = ShowConfirmExit;
config.RememberWindowState.Value = RememberWindowState;
config.HideCursor.Value = (HideCursorMode)HideCursor;
if (_directoryChanged)
@ -498,13 +807,7 @@ namespace Ryujinx.Ava.UI.ViewModels
config.UI.GameDirs.Value = gameDirs;
}
config.UI.BaseStyle.Value = BaseStyleIndex switch
{
0 => "Auto",
1 => "Light",
2 => "Dark",
_ => "Auto"
};
config.UI.BaseStyle.Value = BaseStyleIndex == 0 ? "Light" : "Dark";
// Keyboard Hotkeys
config.Hid.Hotkeys.Value = KeyboardHotkey.GetConfig();

View File

@ -71,7 +71,7 @@ namespace Ryujinx.Ava.UI.Views.Input
if (e.ButtonValue.HasValue)
{
var buttonValue = e.ButtonValue.Value;
viewModel.ParentModel.SettingsViewModel.IsModified = true;
//viewModel.ParentModel.SettingsViewModel.CheckIfModified();
switch (button.Name)
{

View File

@ -672,4 +672,4 @@
</StackPanel>
</Grid>
</StackPanel>
</UserControl>
</UserControl>

View File

@ -68,7 +68,7 @@ namespace Ryujinx.Ava.UI.Views.Input
if (e.ButtonValue.HasValue)
{
var buttonValue = e.ButtonValue.Value;
viewModel.ParentModel.SettingsViewModel.IsModified = true;
// viewModel.ParentModel.SettingsViewModel.CheckIfModified();
switch (button.Name)
{

View File

@ -2,6 +2,7 @@ using Avalonia.Controls;
using FluentAvalonia.UI.Controls;
using Ryujinx.Ava.Common.Locale;
using Ryujinx.Ava.UI.ViewModels.Input;
using Ryujinx.Ava.UI.ViewModels.Settings;
using System.Threading.Tasks;
namespace Ryujinx.Ava.UI.Views.Input

View File

@ -7,7 +7,7 @@
xmlns:controls="clr-namespace:Ryujinx.Ava.UI.Controls"
xmlns:ui="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia"
xmlns:locale="clr-namespace:Ryujinx.Ava.Common.Locale"
xmlns:viewModels="clr-namespace:Ryujinx.Ava.UI.ViewModels"
xmlns:viewModels="clr-namespace:Ryujinx.Ava.UI.ViewModels.Settings"
mc:Ignorable="d"
x:DataType="viewModels:SettingsViewModel">
<Design.DataContext>

View File

@ -5,7 +5,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:locale="clr-namespace:Ryujinx.Ava.Common.Locale"
xmlns:viewModels="clr-namespace:Ryujinx.Ava.UI.ViewModels"
xmlns:viewModels="clr-namespace:Ryujinx.Ava.UI.ViewModels.Settings"
mc:Ignorable="d"
x:DataType="viewModels:SettingsViewModel">
<Design.DataContext>

View File

@ -7,7 +7,7 @@
xmlns:controls="clr-namespace:Ryujinx.Ava.UI.Controls"
xmlns:ui="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia"
xmlns:locale="clr-namespace:Ryujinx.Ava.Common.Locale"
xmlns:viewModels="clr-namespace:Ryujinx.Ava.UI.ViewModels"
xmlns:viewModels="clr-namespace:Ryujinx.Ava.UI.ViewModels.Settings"
Design.Width="1000"
mc:Ignorable="d"
x:DataType="viewModels:SettingsViewModel">

View File

@ -5,7 +5,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:locale="clr-namespace:Ryujinx.Ava.Common.Locale"
xmlns:viewModels="clr-namespace:Ryujinx.Ava.UI.ViewModels"
xmlns:viewModels="clr-namespace:Ryujinx.Ava.UI.ViewModels.Settings"
xmlns:helpers="clr-namespace:Ryujinx.Ava.UI.Helpers"
mc:Ignorable="d"
x:DataType="viewModels:SettingsViewModel"

View File

@ -5,9 +5,9 @@ using Avalonia.Interactivity;
using Avalonia.LogicalTree;
using Ryujinx.Ava.Input;
using Ryujinx.Ava.UI.Helpers;
using Ryujinx.Ava.UI.ViewModels;
using Ryujinx.Input;
using Ryujinx.Input.Assigner;
using Ryujinx.Ava.UI.ViewModels.Settings;
using Key = Ryujinx.Common.Configuration.Hid.Key;
namespace Ryujinx.Ava.UI.Views.Settings

View File

@ -7,12 +7,13 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:views="clr-namespace:Ryujinx.Ava.UI.Views.Input"
xmlns:viewModels="clr-namespace:Ryujinx.Ava.UI.ViewModels.Input"
xmlns:inputViewModels="clr-namespace:Ryujinx.Ava.UI.ViewModels.Input"
xmlns:viewModels="clr-namespace:Ryujinx.Ava.UI.ViewModels.Settings"
xmlns:models="clr-namespace:Ryujinx.Ava.UI.Models"
mc:Ignorable="d"
x:DataType="viewModels:InputViewModel">
x:DataType="viewModels:SettingsInputViewModel">
<Design.DataContext>
<viewModels:InputViewModel />
<viewModels:SettingsInputViewModel />
</Design.DataContext>
<ScrollViewer
Name="InputPage"
@ -215,10 +216,10 @@
</StackPanel>
<ContentControl Content="{Binding ConfigViewModel}" IsVisible="{Binding ShowSettings}">
<ContentControl.DataTemplates>
<DataTemplate DataType="viewModels:ControllerInputViewModel">
<DataTemplate DataType="inputViewModels:ControllerInputViewModel">
<views:ControllerInputView />
</DataTemplate>
<DataTemplate DataType="viewModels:KeyboardInputViewModel">
<DataTemplate DataType="inputViewModels:KeyboardInputViewModel">
<views:KeyboardInputView />
</DataTemplate>
</ContentControl.DataTemplates>

View File

@ -1,16 +1,15 @@
using Avalonia.Controls;
using Ryujinx.Ava.UI.ViewModels;
using Ryujinx.Ava.UI.ViewModels.Input;
using Ryujinx.Ava.UI.ViewModels.Settings;
namespace Ryujinx.Ava.UI.Views.Settings
{
public partial class SettingsInputView : UserControl
{
private InputViewModel ViewModel { get; set; }
private SettingsInputViewModel ViewModel { get; set; }
public SettingsInputView(SettingsViewModel viewModel)
{
DataContext = ViewModel = new InputViewModel(this, viewModel);
DataContext = ViewModel = new SettingsInputViewModel(this, viewModel);
InitializeComponent();
}

View File

@ -6,7 +6,7 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia"
xmlns:locale="clr-namespace:Ryujinx.Ava.Common.Locale"
xmlns:viewModels="clr-namespace:Ryujinx.Ava.UI.ViewModels"
xmlns:viewModels="clr-namespace:Ryujinx.Ava.UI.ViewModels.Settings"
mc:Ignorable="d"
x:DataType="viewModels:SettingsViewModel">
<Design.DataContext>
@ -117,4 +117,4 @@
</StackPanel>
</Border>
</ScrollViewer>
</UserControl>
</UserControl>

View File

@ -5,7 +5,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:locale="clr-namespace:Ryujinx.Ava.Common.Locale"
xmlns:viewModels="clr-namespace:Ryujinx.Ava.UI.ViewModels"
xmlns:viewModels="clr-namespace:Ryujinx.Ava.UI.ViewModels.Settings"
mc:Ignorable="d"
x:DataType="viewModels:SettingsViewModel">
<Design.DataContext>

View File

@ -5,7 +5,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:locale="clr-namespace:Ryujinx.Ava.Common.Locale"
xmlns:viewModels="clr-namespace:Ryujinx.Ava.UI.ViewModels"
xmlns:viewModels="clr-namespace:Ryujinx.Ava.UI.ViewModels.Settings"
xmlns:helpers="clr-namespace:Ryujinx.Ava.UI.Helpers"
mc:Ignorable="d"
x:DataType="viewModels:SettingsViewModel">
@ -154,7 +154,7 @@
SelectionChanged="TimeZoneBox_OnSelectionChanged"
Text="{Binding Path=TimeZone, Mode=OneWay}"
TextChanged="TimeZoneBox_OnTextChanged"
ToolTip.Tip="{locale:Locale TimezoneTooltip}"
ToolTip.Tip="{locale:Locale TimezoneTooltip}"
ValueMemberBinding="{Binding Mode=OneWay, Converter={StaticResource TimeZone}}" />
</StackPanel>
<StackPanel
@ -166,7 +166,7 @@
ToolTip.Tip="{locale:Locale TimeTooltip}"
Width="250"/>
<DatePicker
VerticalAlignment="Center"
VerticalAlignment="Center"
SelectedDate="{Binding CurrentDate}"
ToolTip.Tip="{locale:Locale TimeTooltip}"
Width="350" />
@ -221,4 +221,4 @@
</StackPanel>
</Border>
</ScrollViewer>
</UserControl>
</UserControl>

View File

@ -1,5 +1,5 @@
using Avalonia.Controls;
using Ryujinx.Ava.UI.ViewModels;
using Ryujinx.Ava.UI.ViewModels.Settings;
using TimeZone = Ryujinx.Ava.UI.Models.TimeZone;
namespace Ryujinx.Ava.UI.Views.Settings

View File

@ -5,7 +5,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:locale="clr-namespace:Ryujinx.Ava.Common.Locale"
xmlns:viewModels="clr-namespace:Ryujinx.Ava.UI.ViewModels"
xmlns:viewModels="clr-namespace:Ryujinx.Ava.UI.ViewModels.Settings"
mc:Ignorable="d"
x:DataType="viewModels:SettingsViewModel">
<Design.DataContext>

View File

@ -2,7 +2,7 @@ using Avalonia.Controls;
using Avalonia.Interactivity;
using Avalonia.Platform.Storage;
using Avalonia.VisualTree;
using Ryujinx.Ava.UI.ViewModels;
using Ryujinx.Ava.UI.ViewModels.Settings;
using System.Collections.Generic;
using System.IO;
using System.Linq;

View File

@ -7,7 +7,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:window="clr-namespace:Ryujinx.Ava.UI.Windows"
xmlns:viewModels="clr-namespace:Ryujinx.Ava.UI.ViewModels"
xmlns:viewModels="clr-namespace:Ryujinx.Ava.UI.ViewModels.Settings"
xmlns:helpers="clr-namespace:Ryujinx.Ava.UI.Helpers"
Width="1100"
Height="768"

View File

@ -4,9 +4,9 @@ using FluentAvalonia.Core;
using FluentAvalonia.UI.Controls;
using Ryujinx.Ava.Common.Locale;
using Ryujinx.Ava.UI.Helpers;
using Ryujinx.Ava.UI.ViewModels;
using Ryujinx.Ava.UI.Views.Settings;
using Ryujinx.HLE.FileSystem;
using Ryujinx.Ava.UI.ViewModels.Settings;
using System;
namespace Ryujinx.Ava.UI.Windows