继承EventArgs
比如: /// <summary> /// 定义参数类 /// </summary> public class PingEventArgs : EventArgs { private string [,] _pingResult; /// <summary> /// 构造函数 /// </summary> /// <param name="pingResult">Ping结果</param> public PingEventArgs(string [,] pingResult) { this._pingResult = pingResult; } /// <summary> /// Ping结果 /// </summary> public string[,] PingResult { get{return this._pingResult;} } }定义委托:
public delegate void PingCompletedHandler(object sender,PingEventArgs e);
定义事件:
public event PingCompletedHandler PingCompleted;
事件处理
protected virtual void OnPingCompleted(object sender,PingEventArgs e) { if(PingCompleted != null) PingCompleted(sender,e); }
如果不够具体可以看下面:
http://blog.csdn.net/zhzuo/archive/2004/07/08/37262.aspx
比如: /// <summary> /// 定义参数类 /// </summary> public class PingEventArgs : EventArgs { private string [,] _pingResult; /// <summary> /// 构造函数 /// </summary> /// <param name="pingResult">Ping结果</param> public PingEventArgs(string [,] pingResult) { this._pingResult = pingResult; } /// <summary> /// Ping结果 /// </summary> public string[,] PingResult { get{return this._pingResult;} } }定义委托:
public delegate void PingCompletedHandler(object sender,PingEventArgs e);
定义事件:
public event PingCompletedHandler PingCompleted;
事件处理
protected virtual void OnPingCompleted(object sender,PingEventArgs e) { if(PingCompleted != null) PingCompleted(sender,e); }
如果不够具体可以看下面:
http://blog.csdn.net/zhzuo/archive/2004/07/08/37262.aspx
{
public override eeee(int button,int shift,int x,int y,double mapX,double mapY)
{
this.button=button;
this.shift=shift;
this.x=x;
this.y=y;
this.mapX=mapX;
this.mapY=mapY;
}
}