Exemplo n.º 1
0
 public void FindBadGuys()
 {
     Console.WriteLine("喂! 我是{0}", name);
     if (PoliceCatchThiefEvent != null)
     {
         PoliceCatchThiefEventArgs args = new PoliceCatchThiefEventArgs();
         args.Name        = name;
         args.CurrentTime = DateTime.Now;
         PoliceCatchThiefEvent(this, args);
     }
 }
Exemplo n.º 2
0
 public void RunAway(object sender, PoliceCatchThiefEventArgs args)
 {
     Console.WriteLine("{0} 警察 \"{1}\"來了!, \"{2}\"快跑", args.CurrentTime.ToString("yyyy/MM/dd HH:mm:ss"), args.Name, name);
 }