alielie
2026-06-15 f08871fe7d148d667f2f11f80f64de71a0d9504c
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
using System.Windows.Controls;
using Plugin.SeqEditor.Constant;
using Plugin.SeqEditor.Entity;
using Plugin.SeqEditor.Entity.EditablePO;
using Plugin.SeqEditor.SettingPanel;
 
namespace Plugin.SeqEditor.Util
{
    public class StepUI2EPO
    {
        public static object Convert2EPO(StepUI step)
        {
            switch (step.Type)
            {
                case StepTypeStr.StringValueTest:
                    return new StringValTestEPO(step);
                default:
                    return null;
            }
        }
 
        public static UserControl Convert2EditPanel(StepUI step)
        {
            if (step == null) return null;
            object epo;
            switch (step.Type)
            {
                case StepTypeStr.StringValueTest:
                    epo = new StringValTestEPO(step);
                    return new StringValTestPanel((StringValTestEPO)epo);
                case StepTypeStr.NI_Wait:
                    epo = new WaitEPO(step);
                    return new WaitPanel((WaitEPO)epo);
                case StepTypeStr.NumericLimitTest:
                    epo = new NumValTestEPO(step);
                    return new NumValTestPanel((NumValTestEPO)epo);
                case StepTypeStr.SequenceCall:
                    return new CallSeqPanel(step);
                //    return new ActionPanel(step);
                //case StepTypeStr.SequenceCall:
                //    return new ActionPanel(step);
                //case StepTypeStr.Action:
                //    if (step.Adapter == AdapterName.VICall)
                //        return new ViPanel(new ViCallEPO(step));
                //    else return new ActionPanel(step);
                default:
                    return new ActionPanel(step);
            }
        }
    }
}