mirror of
https://gitee.com/handyorg/HandyControl.git
synced 2024-12-02 20:07:56 +08:00
33 lines
809 B
C#
33 lines
809 B
C#
using System.Collections.Generic;
|
|
using System.Threading.Tasks;
|
|
using GalaSoft.MvvmLight;
|
|
using HandyControlDemo.Data;
|
|
using HandyControlDemo.Service;
|
|
|
|
namespace HandyControlDemo.ViewModel
|
|
{
|
|
public class ContributorsViewModel : ViewModelBase
|
|
{
|
|
/// <summary>
|
|
/// 数据列表
|
|
/// </summary>
|
|
private List<ContributorModel> _dataList;
|
|
|
|
/// <summary>
|
|
/// 数据列表
|
|
/// </summary>
|
|
public List<ContributorModel> DataList
|
|
{
|
|
get => _dataList;
|
|
set => Set(ref _dataList, value);
|
|
}
|
|
|
|
public ContributorsViewModel(DataService dataService)
|
|
{
|
|
Task.Run(() =>
|
|
{
|
|
DataList = dataService.GetContributorDataList();
|
|
});
|
|
}
|
|
}
|
|
} |