alielie
2025-06-12 c1c3772a11b1f3fbad8846cc714120771d85fa53
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
using CommunityToolkit.Mvvm.ComponentModel;
using NationalInstruments.TestStand.Interop.API;
using Plugin.SeqEditor.Util;
using System.Collections.ObjectModel;
 
namespace Plugin.SeqEditor.Entity
{
    public partial class VarUI : ObservableObject
    {
        private string prefix;
        private PropertyObject propertyObject;
 
        public VarUI(PropertyObject po)
        {
            this.propertyObject = po;
        }
 
        [ObservableProperty]
        private ObservableCollection<VarUI> subProperties = new ObservableCollection<VarUI>();
 
        public string Name
        {
            get => propertyObject?.Name;
            set
            {
                if (propertyObject != null)
                {
                    propertyObject.Name = value;
                    OnPropertyChanged(Name);
                }
            }
        }
 
        public string Value
        {
            get => propertyObject?.GetValueString();
            set
            {
                propertyObject?.SetValueString(value);
            }
        }
 
        public PropertyValueTypes? Type
        {
            get => propertyObject?.Type?.ValueType;
        }
 
        public PropertyValueTypes? ElementType
        {
            get => propertyObject?.Type?.ElementType?.ValueType;
        }
 
        public string DisplayString
        {
            get => propertyObject?.Type.DisplayString;
        }
    }
}