private void button1_Click(object sender, RoutedEventArgs e) { ServiceReference1.AlexusVoiceServiceClient client = new AlexusVoiceServiceClient(); client.AuthenticateUserCompleted += client_AuthenticateUserCompleted; client.AuthenticateUserAsync(textBox1.Text, textBox2.Password); //NavigationService.Navigate(new Uri("/MainPage.xaml", UriKind.Relative)); }
void PushChannel_ChannelUriUpdated(object sender, NotificationChannelUriEventArgs e) { Dispatcher.BeginInvoke(() => { // Display the new URI for testing purposes. Normally, the URI would be passed back to your web service at this point. System.Diagnostics.Debug.WriteLine(e.ChannelUri.ToString()); ServiceReference1.AlexusVoiceServiceClient client = new AlexusVoiceServiceClient(); client.UpdateUserDeviceUrlCompleted += new EventHandler<System.ComponentModel.AsyncCompletedEventArgs>(client_UpdateUserDeviceUrlCompleted); client.UpdateUserDeviceUrlAsync(ExecutionContext.UserId, e.ChannelUri.ToString()); }); }