コード例 #1
0
 // Just a little method illustrating a secondary event handler that acts on different data
 // from the CustomEventArgs payload.
 void HandleCustomEvent2(object sender, CustomEventArgs e)
 {
     Console.WriteLine("EventReceiver:  Received Custom Event, Secondary Handler:  {0}\n", e.OtherEventData);
 }
コード例 #2
0
 // This is the handler for the CustomEvent exposed by EventSender.
 // Note that the signature is (object, CustomEventArgs), matching
 // the CustomEventHandler delegate definition in EventSender
 void HandleCustomEvent(object sender, CustomEventArgs e)
 {
     Console.WriteLine("EventReceiver:  Received Custom Event, Primary Handler: {0}", e.EventData);
 }