build: Tạo các tệp đầu ra debug ban đầu cho dự án AppClientBase trên iOS và Mac Catalyst.

This commit is contained in:
Ho Ngoc Hai
2026-01-15 23:45:09 +07:00
parent 28c9dd85d0
commit 2f7d695773
61 changed files with 3627 additions and 946 deletions

View File

@@ -0,0 +1,58 @@
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using AppClientBase.Services;
namespace AppClientBase.ViewModels;
/// <summary>
/// EN: Base ViewModel class with common functionality.
/// VI: Lớp ViewModel cơ sở với chức năng chung.
/// </summary>
public abstract partial class BaseViewModel : ObservableObject
{
/// <summary>
/// EN: Navigation service instance.
/// VI: Instance của dịch vụ điều hướng.
/// </summary>
protected readonly INavigationService NavigationService;
/// <summary>
/// EN: Indicates if the ViewModel is currently loading data.
/// VI: Cho biết ViewModel đang tải dữ liệu hay không.
/// </summary>
[ObservableProperty]
[NotifyPropertyChangedFor(nameof(IsNotBusy))]
private bool _isBusy;
/// <summary>
/// EN: Title of the current page.
/// VI: Tiêu đề của trang hiện tại.
/// </summary>
[ObservableProperty]
private string _title = string.Empty;
/// <summary>
/// EN: Indicates if the ViewModel is not busy.
/// VI: Cho biết ViewModel không bận.
/// </summary>
public bool IsNotBusy => !IsBusy;
/// <summary>
/// EN: Constructor with navigation service.
/// VI: Constructor với dịch vụ điều hướng.
/// </summary>
protected BaseViewModel(INavigationService navigationService)
{
NavigationService = navigationService;
}
/// <summary>
/// EN: Navigate back to previous page.
/// VI: Điều hướng quay lại trang trước.
/// </summary>
[RelayCommand]
protected virtual async Task GoBackAsync()
{
await NavigationService.GoBackAsync();
}
}