qin
2025-03-20 330002911a64ea58d6834b64228870228eb75391
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
using DevExpress.Utils.Svg;
using Yw.WinFrmUI;
 
namespace PBS.Desktop
{
    ///!!! 后续改成继承
    /// <summary>
    /// 用于生成AccordionControl构成的AccordionControlElement的类
    /// </summary>
    public class AccordionElement
    {
        /// <summary>
        /// Id
        /// </summary>
        public string Id { get; set; }
 
        /// <summary>
        /// 标题
        /// </summary>
        public string Caption { get; set; }
 
        /// <summary>
        /// 描述
        /// </summary>
        public string Description { get; set; }
 
        /// <summary>
        /// 图片
        /// </summary>
        public Image Image { get; set; }
 
        /// <summary>
        /// Svg图片
        /// </summary>
        public SvgImage SvgImage { get; set; }
 
        /// <summary>
        /// Svg图片大小
        /// </summary>
        public Size SvgImageSize { get; set; }
 
        /// <summary>
        /// 是否允许图片换肤
        /// </summary>
        public bool AllowGlyphSkinning { get; set; }
 
        /// <summary>
        /// 常开(模块点击就创建页面)
        /// </summary>
        public bool IsNormallyOpen { get; set; }
 
        /// <summary>
        /// 用于构造TileItem时,设置TileItem的可用性
        /// </summary>
        public bool Enable
        {
            get { return _enable; }
            set
            {
                var temp = _enable;
                _enable = value;
                if (temp != _enable)
                {
                    if (this.EnableChangedEvent != null)
                    {
                        this.EnableChangedEvent(_enable);
                    }
                }
            }
        }
 
        private bool _enable = true;
 
        /// <summary>
        /// Enable属性发生改变时触发
        /// </summary>
        public event Action<bool> EnableChangedEvent;
 
        /// <summary>
        /// 委托对象(用于注册TileItem点击事件)
        /// </summary>
        public Action Click;//委托对象
 
        /// <summary>
        /// Page标识
        /// </summary>
        public PageGuid PageGuid { get; set; }
 
        /// <summary>
        /// 子元素列表
        /// </summary>
        public List<AccordionElement> Elements { get; set; }
    }
}