消除所有错误,重新构建

This commit is contained in:
2025-07-26 10:05:43 +08:00
parent 3a3ed7a264
commit e292ea9da8
103 changed files with 4254 additions and 3783 deletions

View File

@@ -1,32 +1,31 @@
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using DMS.WPF.Models;
using S7.Net;
using DMS.WPF.ViewModels.Items;
namespace DMS.WPF.ViewModels.Dialogs;
public partial class DeviceDialogViewModel : ObservableObject
{
[ObservableProperty]
private Device _device;
partial void OnDeviceChanged(Device value)
private DeviceItemViewModel _device;
partial void OnDeviceChanged(DeviceItemViewModel value)
{
if (value != null)
{
System.Diagnostics.Debug.WriteLine($"Device ProtocolType changed to: {value.ProtocolType}");
}
// if (value != null)
// {
// System.Diagnostics.Debug.WriteLine($"Device ProtocolType changed to: {value.ProtocolType}");
// }
}
[ObservableProperty] private string title ;
[ObservableProperty] private string primaryButContent ;
public DeviceDialogViewModel(Device device)
public DeviceDialogViewModel(DeviceItemViewModel device)
{
_device = device;
}
// AddAsync a property to expose CpuType enum values for ComboBox
public Array CpuTypes => Enum.GetValues(typeof(CpuType));
// public Array CpuTypes => Enum.GetValues(typeof(CpuType));
[RelayCommand]