我正在创建一个Windows 8.1 Phone应用程序.UI有一个按钮和一个TextBox(称为txtStatus)
基本上,当我单击UI中的按钮时,以下代码开始(仅显示其中一些):
private async void btnStart_Click(object sender, RoutedEventArgs e)
{
try
{
// Get the list of Microsoft Bands paired to the phone.
IBandInfo[] pairedBands = await BandClientManager.Instance.GetBandsAsync();
if (pairedBands.Length < 1)
{
txtStatus.Text = "This sample app requires a Microsoft Band paired to your device. Also make sure that you have the latest firmware installed on your Band, as provided by the latest Microsoft Health app.";
return;
}
// Connect to Microsoft Band.
using (IBandClient bandClient = …Run Code Online (Sandbox Code Playgroud)