Esempio n. 1
0
        private void Bpm_Click(object sender, RoutedEventArgs e)
        {
            ANT_heart_rate.clearBsValue();
            ANT_heart_rate.clearBcValue();
            ANT_heart_rate.clearHrValue();
            bool flag = GlobalData.heartChannel == 9;

            if (flag)
            {
                try
                {
                    ANT_heart_rate.hr_Init();
                }
                catch (Exception ex)
                {
                    MessageBox.Show("Connect failed with exception: \n" + ex.Message);
                }
                GlobalData.deviceStyle = 2;
                SearchWindow bpm = new SearchWindow();
                bpm.ShowDialog();
            }
            else
            {
                bool flag2 = GlobalData.heartChannel >= 0 && GlobalData.heartChannel < 8;
                if (flag2)
                {
                    ANT_heart_rate.disconnectHr();
                    ANT_heart_rate.clearHrValue();
                    this.Xinlv.Visibility         = Visibility.Collapsed;
                    GlobalData.heartRateequipment = null;
                    XMLHelper.HeartRateDeviceNumberDeleter("HeartRateDeviceNumber");
                }
            }
        }
Esempio n. 2
0
        private void General_Click(object sender, RoutedEventArgs e)
        {
            ANT_heart_rate.clearBsValue();
            ANT_heart_rate.clearBcValue();
            ANT_heart_rate.clearHrValue();
            bool flag = GlobalData.speedChannel == 9;

            if (flag)
            {
                try
                {
                    ANT_heart_rate.bs_Init();
                }
                catch (Exception ex)
                {
                    MessageBox.Show("Connect failed with exception: \n" + ex.Message);
                }
                GlobalData.deviceStyle = 0;
                SearchWindow gp = new SearchWindow();
                gp.ShowDialog();
            }
            else
            {
                bool flag2 = GlobalData.speedChannel >= 0 && GlobalData.speedChannel < 8;
                if (flag2)
                {
                    ANT_heart_rate.disconnectBs();
                    ANT_heart_rate.clearBsValue();
                    this.PuTong.Visibility    = Visibility.Collapsed;
                    GlobalData.speedequipment = null;
                    XMLHelper.SpeedDeviceNumberDeleter("SpeedDeviceNumber");
                    GlobalData.ANT_Connectflag = false;
                }
            }
        }
Esempio n. 3
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");
                }
            }
        }
Esempio n. 4
0
        //internal MediaElement mediaElement1;

        //internal Label closeLabel;

        //internal Label speedBox;

        //internal Label speedBoxUnit;

        //internal Label powerBox;

        //internal Label powerBoxUnit;

        //internal Label distanceBox;

        //internal Label distanceBoxUnit;

        //internal Label energyBox;

        //internal Label energyBoxUnit;

        //internal Label slopeBox;

        //internal Label slopeBoxUnit;

        //internal Label timeBox;

        //internal Label heartBox;

        //internal Label heartBoxUnit;

        //internal Label tramptBox;

        //internal Label tramptBoxUnit;

        //internal Image P_image;

        //internal Label P_distanceBox;

        //internal Image C_image;

        //internal Label C_distanceBox;

        //private bool _contentLoaded;

        public VideoWindow(Video v)
        {
            ANT_heart_rate.clearBsValue();
            ANT_heart_rate.clearBcValue();
            ANT_heart_rate.clearHrValue();
            this.InitializeComponent();
            this.video = v;
            this.ReadSlope(this.video.SlopePath);
            this.Data_Init();
            this.timer_Init();
        }