private void btnReadPose_Click(object sender, RoutedEventArgs e) { UpdateInfo(); data.PoseInfo pi = ucActionDetail.GetSelectedPose(); if (pi == null) { UpdateInfo("没有选定姿势", MyUtil.UTIL.InfoType.alert); } else { UBT.SetPose(pi.actionId, pi.poseId); for (int i = 1; i <= CONST.MAX_SERVO; i++) { servo[i].SetLED(pi.servoLed[i]); servo[i].Show(); } if (activeServo > 0) { rbLedNoChange.IsChecked = (pi.servoLed[activeServo] == CONST.LED.NO_CHANGE); rbLedTurnOn.IsChecked = (pi.servoLed[activeServo] == CONST.LED.TURN_ON); rbLedTurnOff.IsChecked = (pi.servoLed[activeServo] == CONST.LED.TURN_OFF); } rbHeadLedNoChange.IsChecked = (pi.headLed == CONST.LED.NO_CHANGE); rbHeadLedTurnOn.IsChecked = (pi.headLed == CONST.LED.TURN_ON); rbHeadLedTurnOff.IsChecked = (pi.headLed == CONST.LED.TURN_OFF); if (pi.mp3Vol == CONST.AI.STOP_MUSIC_VOL) { cbxStopMp3.IsChecked = true; tbMp3Folder.Text = ""; tbMp3File.Text = ""; tbMp3Vol.Text = ""; } else { cbxStopMp3.IsChecked = false; tbMp3Folder.Text = (pi.mp3Folder == 0xff ? "" : pi.mp3Folder.ToString()); tbMp3File.Text = (pi.mp3File == 0xff ? "" : pi.mp3File.ToString()); tbMp3Vol.Text = (pi.mp3Vol == 0xff ? "" : pi.mp3Vol.ToString()); } tbExecTime.Text = pi.servoTime.ToString(); tbWaitTime.Text = pi.waitTime.ToString(); } }