refactor:将所有的ItemViewMdoel的名字删除ViewModel,并将命名空间调整为DMS.WPF.ItemViewModel.
This commit is contained in:
52
DMS.WPF/ItemViewModel/OpcUaNodeItem.cs
Normal file
52
DMS.WPF/ItemViewModel/OpcUaNodeItem.cs
Normal file
@@ -0,0 +1,52 @@
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using DMS.Infrastructure.Models;
|
||||
using Opc.Ua;
|
||||
using System.Collections.ObjectModel;
|
||||
|
||||
namespace DMS.WPF.ItemViewModel
|
||||
{
|
||||
/// <summary>
|
||||
/// OPC UA节点的视图模型。
|
||||
/// </summary>
|
||||
public partial class OpcUaNodeItem : ObservableObject
|
||||
{
|
||||
|
||||
[ObservableProperty]
|
||||
private NodeId? _nodeId;
|
||||
|
||||
[ObservableProperty]
|
||||
private string? _displayName;
|
||||
|
||||
[ObservableProperty]
|
||||
private NodeClass _nodeClass;
|
||||
|
||||
[ObservableProperty]
|
||||
private object? _value;
|
||||
|
||||
[ObservableProperty]
|
||||
private string? _dataType;
|
||||
|
||||
[ObservableProperty]
|
||||
private OpcUaNodeItem? _parentNode;
|
||||
|
||||
[ObservableProperty]
|
||||
private ObservableCollection<OpcUaNodeItem> _children = new ObservableCollection<OpcUaNodeItem>();
|
||||
|
||||
[ObservableProperty]
|
||||
private bool _isExpanded;
|
||||
|
||||
[ObservableProperty]
|
||||
private bool _isSelected;
|
||||
|
||||
/// <summary>
|
||||
/// 默认构造函数(用于设计时支持)。
|
||||
/// </summary>
|
||||
public OpcUaNodeItem()
|
||||
{
|
||||
// 设计时数据支持
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user