private void PublishUriButton_Click(object sender, RoutedEventArgs e)
        {
            // Stop publishing the current message.
            if (publishedUriId != -1)
            {
                proximityDevice.StopPublishingMessage(publishedUriId);
            }

            publishedUriId =
                proximityDevice.PublishUriMessage(new Uri("http://www.microsoft.com"));
        }
Ejemplo n.º 2
0
        private void PublishMessage(object sender, RoutedEventArgs e)
        {
            // Stop publishing the current message.
            if (publishedMessageId != -1)
            {
                proximityDevice.StopPublishingMessage(publishedMessageId);
            }

            publishedMessageId =
                proximityDevice.PublishMessage("Windows.SampleMessage", MessageTextBlock.Text);
        }