lixiaojun
2024-07-11 8d8cd298ab46aee191baf53ff320fd3290d1ec9a
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
using DevExpress.Utils.Svg;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
 
namespace IStation.WinFrmUI
{
    /// <summary>
    /// 用于生成TileControl构成的PeekControl的类
    /// </summary>
    public class TilePeekItem
    {
 
        /// <summary>
        /// 新增字段(20191024)用于构造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>
        /// 标题
        /// </summary>
        public string Caption { get; set; }
 
        /// <summary>
        /// 描述
        /// </summary>
        public string Description { get; set; }
 
        /// <summary>
        /// 图片
        /// </summary>
        public Image NormalImage { get; set; }
 
        /// <summary>
        /// 标签
        /// </summary>
        public object Tag { get; set; }
 
        /// <summary>
        /// Svg
        /// </summary>
        public SvgImage SvgImage { get; set; }
 
        /// <summary>
        /// 委托对象(用于注册TileItem点击事件)
        /// </summary>
        public Action Click;//委托对象
 
        /// <summary>
        /// 新增事件(20191024)Enable属性发生改变时触发
        /// </summary>
        public event Action<bool> EnableChangedEvent;
 
    }
}