2025-07-01 11:11:02 +08:00
|
|
|
using System.Collections.ObjectModel;
|
2025-06-30 14:19:22 +08:00
|
|
|
using CommunityToolkit.Mvvm.ComponentModel;
|
|
|
|
|
using PMSWPF.Models;
|
|
|
|
|
|
2025-06-23 17:01:06 +08:00
|
|
|
namespace PMSWPF.ViewModels;
|
|
|
|
|
|
2025-06-30 14:19:22 +08:00
|
|
|
partial class VariableTableViewModel : ViewModelBase
|
2025-06-23 17:01:06 +08:00
|
|
|
{
|
2025-06-30 14:19:22 +08:00
|
|
|
[ObservableProperty]
|
|
|
|
|
private VariableTable variableTable;
|
2025-07-01 11:11:02 +08:00
|
|
|
[ObservableProperty]
|
|
|
|
|
private ObservableCollection<DataVariable> _dataVariables;
|
|
|
|
|
|
2025-06-23 17:01:06 +08:00
|
|
|
public override void OnLoaded()
|
|
|
|
|
{
|
2025-07-01 11:11:02 +08:00
|
|
|
if (VariableTable.DataVariables!=null )
|
|
|
|
|
{
|
|
|
|
|
_dataVariables = new ObservableCollection<DataVariable>(VariableTable.DataVariables);
|
|
|
|
|
}
|
2025-06-23 17:01:06 +08:00
|
|
|
}
|
|
|
|
|
}
|