tangxu
2025-01-13 4f7cb65b079d88d5a829688b24d26d5145c5df47
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
 
namespace Microsoft.Windows.Forms
{
    public partial class Sprite
    {
        private bool m_AutoFeedback = false;
        /// <summary>
        /// 是否自动反馈到Owner
        /// </summary>
        public bool AutoFeedback
        {
            get
            {
                return this.m_AutoFeedback;
            }
            set
            {
                if (value != this.m_AutoFeedback)
                {
                    this.m_AutoFeedback = value;
                }
            }
        }
 
        private IUIControl m_Owner;
        /// <summary>
        /// 父控件
        /// </summary>
        public IUIControl Owner
        {
            get
            {
                return this.m_Owner;
            }
        }
 
        /// <summary>
        /// 反馈方法,非强制
        /// </summary>
        public void Feedback()
        {
            this.Feedback(false);
        }
 
        /// <summary>
        /// 反馈方法
        /// </summary>
        /// <param name="force">是否强制反馈</param>
        public void Feedback(bool force)
        {
            if (this.m_Owner != null && (force || this.m_AutoFeedback))
                this.m_Owner.Invalidate();
        }
    }
}