Esempio n. 1
0
        private void ServoSeletion(object sender, EventArgs e)
        {
            updating_servo_info = true;
            uc.UcServo ucServo = (uc.UcServo)sender;

            if (ucServo.isActive)
            {
                if (rbSelect.IsChecked == true)
                {
                    ucServo.SetSelection(true);
                }
                else if (rbUnSelect.IsChecked == true)
                {
                    ucServo.SetSelection(false);
                }
                else if (rbToggle.IsChecked == true)
                {
                    ucServo.SetSelection(!ucServo.isSelected);
                }
            }
            UpdateActiveServoInfo();

            updating_servo_info = false;
            UpdateInfo(String.Format("Servo_Click from {0}", ucServo.id));
        }
Esempio n. 2
0
        private void ServoSeletion(object sender, EventArgs e)
        {
            updating_servo_info = true;
            // uc.UcServo ucServo = (uc.UcServo)sender;
            uc.UcServo ucServo = (uc.UcServo)sender;

            /*
             * if ((activeServo > 0) && (activeServo != ucServo.id))
             * {
             *  servo[activeServo].SetActive(false);
             * }
             * ucServo.SetActive(true);
             * activeServo = (ucServo.isActive ? ucServo.id : 0);
             */
            if (ucServo.isActive)
            {
                if (rbSelect.IsChecked == true)
                {
                    ucServo.SetSelection(true);
                }
                else if (rbUnSelect.IsChecked == true)
                {
                    ucServo.SetSelection(false);
                }
                else if (rbToggle.IsChecked == true)
                {
                    ucServo.SetSelection(!ucServo.isSelected);
                }
            }
            UpdateActiveServoInfo();

            updating_servo_info = false;
            UpdateInfo(String.Format("Servo_Click from {0}", ucServo.id));
        }