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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
using CommunityToolkit.Mvvm.ComponentModel;
using NationalInstruments.TestStand.Interop.API;
using System.Collections.ObjectModel;
 
namespace Plugin.SeqEditor.Entity
{
    public partial class StepUI : ObservableObject
    {
        public Step step { get; private set; }
 
        public StepUI(Step step)
        {
            this.step = step;
        }
 
        public void UpdatePropertyChanged(string name)
        {
            OnPropertyChanged(name);
        }
 
        public string Name
        {
            get => step?.Name;
            set
            {
                if (step != null)
                {
                    step.Name = value;
                    OnPropertyChanged(nameof(Name));
                }
            }
        }
 
        public string Description
        {
            get => step?.Description;
        }
 
        public string RunMode
        {
            get => step?.GetRunModeEx();
            set
            {
                if (step != null)
                {
                    step.SetRunModeEx(value);
                    OnPropertyChanged(nameof(RunMode));
                }
            }
        }
 
        public string Type
        {
            get => step?.StepType?.Name;
        }
 
        public bool CanChangeAdapter
        {
            get => step?.CanChangeAdapter() ?? true;
        }
 
        public string Adapter
        {
            get => step?.AdapterKeyName;
            set
            {
                if (step != null)
                {
                    step.ChangeAdapter(value);
                    OnPropertyChanged(nameof(RunMode));
                }
            }
        }
 
 
 
        public StepGroups? StepGroup
        {
            get
            {
                return step?.StepGroup;
            }
        }
 
        [ObservableProperty]
        private string group;
 
        [ObservableProperty]
        public ObservableCollection<StepUI> children = new();
    }
}