Esempio n. 1
0
        private async void StartButton_Clicked(object sender, EventArgs e)
        {
            try
            {
                if (deviceList.SelectedItem != null)
                {
                    string name = deviceList.SelectedItem.ToString();

                    if (!started)
                    {
                        Instance.showText(string.Format("Connecting to \"{0}\"...", name));
                    }

                    started = await driver.BtConnect(deviceMap[name].ID).ConfigureAwait(false);
                }

                if (started)
                {
                    driver.Start();
                    Instance.showText("done");
                }
            }
            catch (Exception exc)
            {
                System.Diagnostics.Debug.WriteLine(exc.Message);
                System.Diagnostics.Debugger.Break();
            }
        }