示例#1
0
 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));
 }
示例#2
0
        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());
            });
        }