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.
51 lines
1.1 KiB
51 lines
1.1 KiB
|
2 months ago
|
using ReactiveUI;
|
||
|
|
|
||
|
|
namespace MyAvaloniaApp.ViewModels.Pages;
|
||
|
|
|
||
|
|
/// <summary>
|
||
|
|
/// 设置页面ViewModel
|
||
|
|
/// </summary>
|
||
|
|
public class SettingsPageViewModel : ReactiveObject
|
||
|
|
{
|
||
|
|
private bool _darkMode = false;
|
||
|
|
private string _language = "zh-CN";
|
||
|
|
private bool _notifications = true;
|
||
|
|
private int _refreshInterval = 30;
|
||
|
|
|
||
|
|
/// <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);
|
||
|
|
}
|
||
|
|
}
|