Exemple #1
0
        private void Rpm_Click(object sender, RoutedEventArgs e)
        {
            ANT_heart_rate.clearBsValue();
            ANT_heart_rate.clearBcValue();
            ANT_heart_rate.clearHrValue();
            bool flag = GlobalData.cadenceChannel == 9;

            if (flag)
            {
                try
                {
                    ANT_heart_rate.bc_Init();
                }
                catch (Exception ex)
                {
                    MessageBox.Show("Connect failed with exception: \n" + ex.Message);
                }
                GlobalData.deviceStyle = 1;
                SearchWindow gp = new SearchWindow();
                gp.ShowDialog();
            }
            else
            {
                bool flag2 = GlobalData.cadenceChannel >= 0 && GlobalData.cadenceChannel < 8;
                if (flag2)
                {
                    ANT_heart_rate.disconnectBc();
                    ANT_heart_rate.clearBcValue();
                    this.TaPin.Visibility       = Visibility.Collapsed;
                    GlobalData.cadenceequipment = null;
                    XMLHelper.CadenceDeviceNumberDeleter("CadenceDeviceNumber");
                }
            }
        }