You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

59 lines
1.3 KiB

using MyAvaloniaApp.ViewModels.Base;
using ReactiveUI;
namespace MyAvaloniaApp.ViewModels.Pages;
/// <summary>
/// 设置页面ViewModel
/// </summary>
public class SettingsPageViewModel : RoutableViewModel
{
private bool _darkMode = false;
private string _language = "zh-CN";
private bool _notifications = true;
private int _refreshInterval = 30;
/// <summary>
/// 构造函数
/// </summary>
/// <param name="hostScreen">宿主 Screen</param>
public SettingsPageViewModel(IScreen hostScreen) : base(hostScreen, "Settings")
{
}
/// <summary>
/// 深色模式
/// </summary>
public bool DarkMode
{
get => _darkMode;
set => this.RaiseAndSetIfChanged(ref _darkMode, value);
}
/// <summary>
/// 语言设置
/// </summary>
public string Language
{
get => _language;
set => this.RaiseAndSetIfChanged(ref _language, value);
}
/// <summary>
/// 通知设置
/// </summary>
public bool Notifications
{
get => _notifications;
set => this.RaiseAndSetIfChanged(ref _notifications, value);
}
/// <summary>
/// 刷新间隔(秒)
/// </summary>
public int RefreshInterval
{
get => _refreshInterval;
set => this.RaiseAndSetIfChanged(ref _refreshInterval, value);
}
}