示例#1
0
 private void HandleResponse(Object sender, ResponseEventArgs args)
 {
     if (InvokeRequired)
     {
         Invoke(new  EventHandler<ResponseEventArgs>(HandleResponse), new Object[] { sender, args });
     }
     Debug.WriteLine("Response received: {0}", args);
     DisplayResult(args.ResponseResult);
 }
示例#2
0
 private void OnRaiseResponseEvent(Result result)
 {
     EventHandler<ResponseEventArgs> handler = RaiseResponseEvent;
     if (handler != null)
     {
         ResponseEventArgs args = new ResponseEventArgs(result);
         handler(this, args);
     }
 }