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.4 KiB
59 lines
1.4 KiB
using MyAvaloniaApp.ViewModels.Base;
|
|
using ReactiveUI;
|
|
|
|
namespace MyAvaloniaApp.ViewModels.Pages;
|
|
|
|
/// <summary>
|
|
/// 仪表板页面ViewModel
|
|
/// </summary>
|
|
public class DashboardPageViewModel : RoutableViewModel
|
|
{
|
|
private string _welcomeMessage = "欢迎使用仪表板!";
|
|
private int _totalUsers = 1250;
|
|
private int _activeSessions = 45;
|
|
private double _systemLoad = 75.5;
|
|
|
|
/// <summary>
|
|
/// 构造函数
|
|
/// </summary>
|
|
/// <param name="hostScreen">宿主 Screen</param>
|
|
public DashboardPageViewModel(IScreen hostScreen) : base(hostScreen, "Dashboard")
|
|
{
|
|
}
|
|
|
|
/// <summary>
|
|
/// 欢迎消息
|
|
/// </summary>
|
|
public string WelcomeMessage
|
|
{
|
|
get => _welcomeMessage;
|
|
set => this.RaiseAndSetIfChanged(ref _welcomeMessage, value);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 总用户数
|
|
/// </summary>
|
|
public int TotalUsers
|
|
{
|
|
get => _totalUsers;
|
|
set => this.RaiseAndSetIfChanged(ref _totalUsers, value);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 活跃会话数
|
|
/// </summary>
|
|
public int ActiveSessions
|
|
{
|
|
get => _activeSessions;
|
|
set => this.RaiseAndSetIfChanged(ref _activeSessions, value);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 系统负载
|
|
/// </summary>
|
|
public double SystemLoad
|
|
{
|
|
get => _systemLoad;
|
|
set => this.RaiseAndSetIfChanged(ref _systemLoad, value);
|
|
}
|
|
}
|
|
|