今天又是考试时间了,大家来考试了,第一题,答对有奖呀
点击次数:25 次 发布日期:2008-11-27 01:45:31 作者:源代码网
|
public class FlyBird { private static FlyBird bird; public static FlyBird getBird() { if(bird==null) bird=new FlyBird(); return bird; } public event FlyEventHandler OnFly; public void OnFlyEvent(string m) { this.OnFly(this,new FlyEventArgs(m)); } public void StartFly() { this.OnFlyEvent("正在起飞..."); .... } public void PauseFly() { this.OnFlyEvent("暂停飞行..."); ... } public void Cookie() { this.OnFlyEvent("回家做饭:)。。。"): .... } public void InLove() { this.OnFlyEvent("恋爱中..."); } public FlyBird() { } public delegate void FlyEventHandler(object,FlyEventArgs); } public class FlyEventArgs:EventArgs { private string status; public string Status { get { return status; } } public FlyEventArgs(string m):base() { this.status=m; }< 源代码网供稿. |
