private void Start_Training(object sender, RoutedEventArgs e) { String trainingName = TrainingNameSelect.Text; if (trainingName == null || trainingName.Equals("")) { MessageBox.Show("请选择训练"); return; } this.training = MyTraining1Factory.createPostureTraining(trainingName); training.next(); if (!training.isFinish()) { targetImageElement.Source = training.getPosture().getPic(); } //update UI TrainingProgress.Value = training.getProgess(); StatusLabel.Content = training.SuccessCount + " / " + training.Index; consumer.start(); timer.Start(); }
private void nextPosture(bool success) { sendMsg("go"); training.next(success); if (!training.isFinish()) { targetImageElement.Source = training.getPosture().getPic(); } else { TrainingFinish(); } }
private void Start_Game(object sender, RoutedEventArgs e) { Process p = Process.Start(Constant.GAME_EXE_PATH); socket = serverSocket.Accept(); this.training = MyTraining1Factory.create1(); training.next(); if (!training.isFinish()) { targetImageElement.Source = training.getPosture().getPic(); } consumer.start(); }
private void nextPosture(bool success) { training.next(success); //update UI TrainingProgress.Value = training.getProgess(); StatusLabel.Content = training.SuccessCount + " / " + training.Index; if (!training.isFinish()) { targetImageElement.Source = training.getPosture().getPic(); } else { TrainingFinish(); } }