Exemple #1
0
        private async void Page_Loaded(object sender, RoutedEventArgs e)
        {
            PebbleConnector _pc = PebbleConnector.GetInstance();

            if (!await _pc.IsPebbleAssociated())
            {
                MessageDialog msgBox = new MessageDialog("No Pebble device has been associated with Pebble Time Manager. Do you want to search and associate a device now?" + System.Environment.NewLine + System.Environment.NewLine + "This will take a couple of seconds to complete.");
                msgBox.Commands.Add(new UICommand("Yes", new UICommandInvokedHandler(this.AssociateInvokedHandler)));
                msgBox.Commands.Add(new UICommand("No", new UICommandInvokedHandler(this.AssociateInvokedHandler)));

                await msgBox.ShowAsync();
            }
        }