alvin.chen
2019-11-29 edf127edc771f715c49f86e91e768633f0a0ed93
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
using System;
 
namespace EventTool
{
    public class ListenEventCreater
    {
        public event EventHandler<ListenEventArgs> ListenEvent;
 
        public void ChangeValue(EventData iData)
        {
            ListenEventArgs args = new ListenEventArgs(iData);
            this.SendEvent(args);
        }
 
        protected virtual void SendEvent(ListenEventArgs args)
        {
            EventHandler<ListenEventArgs> listenEvent = this.ListenEvent;
            if (listenEvent != null)
            {
                listenEvent(this, args);
            }
        }
    }
}