duheng
2024-07-23 3fec42c6383aa3b8d65f744a93b8a918d7cc6e02
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
using System;
using System.Collections.Generic;
using System.Drawing;
 
namespace HStation.Desktop
{
    /// <summary>
    /// 功能元素
    /// </summary>
    public class FuncElement
    {
        public FuncElement() { }
 
        public FuncElement(string name)
        {
            this.Id = Guid.NewGuid().ToString();
            this.Name = name;
            this.IsGroup = true;
        }
 
        public FuncElement(string name, List<FuncElement> elements = null)
        {
 
            this.Id = Guid.NewGuid().ToString();
            this.Name = name;
            this.IsGroup = true;
            this.FuncElements = elements;
        }
 
        public FuncElement(string name, List<FuncElement> elements = null, Image img = null)
        {
 
            this.Id = Guid.NewGuid().ToString();
            this.Name = name;
            this.IsGroup = true;
            this.Image = img;
            this.FuncElements = elements;
        }
 
        public FuncElement(string name, string dllFileName, string controlFullName, Image img = null)
        {
            this.Id = Guid.NewGuid().ToString();
            this.Name = name;
            this.DllFileName = dllFileName;
            this.ControlFullName = controlFullName;
            //this.SurfaceGuid = new WinFrmUI.SurfaceGuid(modular, name);
            this.Image = img;
            this.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; }
 
    }
}