You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
using Admin.Core.Common;
|
|
|
|
|
using Admin.Core.IService;
|
|
|
|
|
using AutoMapper.Configuration;
|
|
|
|
|
using CommunityToolkit.Mvvm.ComponentModel;
|
|
|
|
|
using CommunityToolkit.Mvvm.Input;
|
|
|
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
|
using NetTaste;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using System.Windows;
|
|
|
|
|
using System.Windows.Input;
|
|
|
|
|
|
|
|
|
|
namespace Admin.Core.Wpf.ViewModel
|
|
|
|
|
{
|
|
|
|
|
public class MainWindowViewModel : ObservableObject
|
|
|
|
|
{
|
|
|
|
|
//protected readonly IEEquipmentCategoryServices? _quipmentCategoryServices;
|
|
|
|
|
|
|
|
|
|
public MainWindowViewModel()
|
|
|
|
|
{
|
|
|
|
|
// _quipmentCategoryServices = App.ServiceProvider.GetService<IEEquipmentCategoryServices>();
|
|
|
|
|
|
|
|
|
|
ExecCommand = new AsyncRelayCommand(ExecMethod);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#region 点击方法
|
|
|
|
|
public ICommand ExecCommand { get; }
|
|
|
|
|
public async Task ExecMethod()
|
|
|
|
|
{
|
|
|
|
|
await Task.Run(async () =>
|
|
|
|
|
{
|
|
|
|
|
//var r=await _quipmentCategoryServices.QueryAsync();
|
|
|
|
|
|
|
|
|
|
//foreach (var item in r)
|
|
|
|
|
//{
|
|
|
|
|
// MessageBox.Show(item.Name);
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
//WeakReferenceMessenger.Default.Send("数据采集成功");
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
}
|
|
|
|
|
}
|