Пример #1
0
 void sessionClient_checkExistsCompleted(object sender, SessionService.checkExistsCompletedEventArgs e)
 {
     if (e.Result == false)
     {
         sessionClient = new SessionService.Service1Client();
         sessionClient.setDeviceChannelAsync(deviceID.ToString(), pushChannel.ChannelUri.ToString());
         sessionClient.setDeviceChannelCompleted += new EventHandler <SessionService.setDeviceChannelCompletedEventArgs>(sessionClient_setDeviceChannelCompleted);
     }
 }
Пример #2
0
 void pushClient_SubscribeMyPhoneCompleted(object sender, System.ComponentModel.AsyncCompletedEventArgs e)
 {
     if (e.Error != null)
     {
         MessageBox.Show(e.Error.Message);
     }
     else
     {
         sessionClient = new SessionService.Service1Client();
         sessionClient.checkExistsAsync(deviceID.ToString(), pushChannel.ChannelUri.ToString());
         RoadMode.deviceID = deviceID.ToString();
         sessionClient.checkExistsCompleted += new EventHandler <SessionService.checkExistsCompletedEventArgs>(sessionClient_checkExistsCompleted);
     }
 }