mirror of
https://github.com/GreemDev/Ryujinx.git
synced 2025-08-30 07:25:05 +00:00
Some checks are pending
Canary release job / Create tag (push) Waiting to run
Canary release job / Release for linux-arm64 (push) Waiting to run
Canary release job / Release for linux-x64 (push) Waiting to run
Canary release job / Release for win-x64 (push) Waiting to run
Canary release job / Release MacOS universal (push) Waiting to run
38 lines
1.1 KiB
C#
38 lines
1.1 KiB
C#
using Avalonia.Controls;
|
|
using Avalonia.Interactivity;
|
|
using Ryujinx.Ava.UI.ViewModels;
|
|
using TimeZone = Ryujinx.Ava.UI.Models.TimeZone;
|
|
|
|
namespace Ryujinx.Ava.UI.Views.Settings
|
|
{
|
|
public partial class SettingsSystemView : UserControl
|
|
{
|
|
public SettingsViewModel ViewModel;
|
|
|
|
public SettingsSystemView()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
private void TimeZoneBox_OnSelectionChanged(object sender, SelectionChangedEventArgs e)
|
|
{
|
|
if (e.AddedItems != null && e.AddedItems.Count > 0)
|
|
{
|
|
if (e.AddedItems[0] is TimeZone timeZone)
|
|
{
|
|
e.Handled = true;
|
|
|
|
ViewModel.ValidateAndSetTimeZone(timeZone.Location);
|
|
}
|
|
}
|
|
}
|
|
|
|
private void TimeZoneBox_OnTextChanged(object sender, TextChangedEventArgs e)
|
|
{
|
|
if (sender is AutoCompleteBox box && box.SelectedItem is TimeZone timeZone)
|
|
{
|
|
ViewModel.ValidateAndSetTimeZone(timeZone.Location);
|
|
}
|
|
}
|
|
}
|
|
}
|