ningshuxia
2025-03-31 d321346f204a69b1929cc39098a5d88f44509e7b
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
using System;
using System.Collections.Generic;
using System.Drawing;
 
namespace IStation
{
    /// <summary>
    /// 功能元素
    /// </summary>
    public class FuncElement
    {
        public FuncElement() { }
 
        public FuncElement(string name)
        {
            Id = Guid.NewGuid().ToString();
            Name = name;
            IsGroup = true;
        }
 
        public FuncElement(string name, List<FuncElement> elements = null)
        {
 
            Id = Guid.NewGuid().ToString();
            Name = name;
            IsGroup = true;
            FuncElements = elements;
        }
 
        public FuncElement(string name, List<FuncElement> elements = null, Image img = null)
        {
 
            Id = Guid.NewGuid().ToString();
            Name = name;
            IsGroup = true;
            Image = img;
            FuncElements = elements;
        }
 
        public FuncElement(string name, string dllFileName, string controlFullName, WinFrmUI.eModular modular, Image img = null)
        {
            Id = Guid.NewGuid().ToString();
            Name = name;
            DllFileName = dllFileName;
            ControlFullName = controlFullName;
            SurfaceGuid = new WinFrmUI.SurfaceGuid(modular, name);
            Image = img;
            IsGroup = false;
        }
        public FuncElement(string name, string dllFileName, string controlFullName, WinFrmUI.SurfaceGuid sguid, Image img = null)
        {
            Id = Guid.NewGuid().ToString();
            Name = name;
            DllFileName = dllFileName;
            ControlFullName = controlFullName;
            SurfaceGuid = sguid;
            Image = img;
            IsGroup = false;
        }
 
        /// <summary>
        /// 标识
        /// </summary>
        public string Id { get; set; }
 
        /// <summary>
        /// 名称
        /// </summary>
        public string Name { get; set; }
 
        /// <summary>
        /// 图片
        /// </summary>
        public Image Image { get; set; }
 
        /// <summary>
        /// DLL 文件名称
        /// </summary>
        public string DllFileName { get; set; }
 
        /// <summary>
        /// 控件全名称
        /// </summary>
        public string ControlFullName { get; set; }
 
        /// <summary>
        /// 自身标识
        /// </summary>
        public WinFrmUI.SurfaceGuid SurfaceGuid { get; set; }
 
        /// <summary>
        /// 展开
        /// </summary>
        public bool Expand { get; set; }
 
        /// <summary>
        /// 分组
        /// </summary>
        public bool IsGroup { get; set; }
 
        /// <summary>
        /// 子元素列表
        /// </summary>
        public List<FuncElement> FuncElements { get; set; }
 
    }
}