2025-06-12 13:15:55 +08:00
|
|
|
|
using PMSWPF.Models;
|
|
|
|
|
|
using PMSWPF.ViewModels.Dialogs;
|
|
|
|
|
|
using PMSWPF.Views.Dialogs;
|
|
|
|
|
|
|
|
|
|
|
|
namespace PMSWPF.Services;
|
|
|
|
|
|
|
|
|
|
|
|
public class DeviceDialogService : IDeviceDialogService
|
|
|
|
|
|
{
|
|
|
|
|
|
public async Task<Device> ShowAddDeviceDialog(Device device)
|
|
|
|
|
|
{
|
2025-06-12 18:41:46 +08:00
|
|
|
|
DeviceDialogViewModel ddvm = new DeviceDialogViewModel(device)
|
2025-06-12 13:15:55 +08:00
|
|
|
|
{
|
|
|
|
|
|
Title = "添加设备"
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
DeviceDialog dialog = new DeviceDialog(ddvm);
|
|
|
|
|
|
await dialog.ShowAsync();
|
|
|
|
|
|
return device;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|