public void OnRecordingCompletedEvent(object sender, WiimoteRecordingEventArgs e)
        {
            if (!e.RecordingInvoker.Equals(this))
            {
                return;
            }

            this.m_parent.SetTextBeatCounter(e.getNumBeatInBar().ToString());

            if (m_RecordReference)
            {
                m_RecordReference = false;
                this.m_parent.SetTextRecordingStatus(REFERENCE_RECORDING_COMPLETED);
            }

            if (m_RecordPlay)
            {
                m_RecordPlay = false;
                this.m_parent.SetTextRecordingStatus(PLAY_RECORDING_COMPLETED);
            }

            this.m_parent.SetTestTimerButtonState(true);
            this.m_parent.SetRecordingButtonState(false);

            this.m_parent.SetTextBeatCounter("");

            ApplicationSpeech.speakText(ProjectConstants.RECORDING_COMPLETED_TEXT);

            this.m_parent.TestTimer.Enabled = true;

            this.m_parent.SetReferenceRecordingItemDataBindingSource(((WiimoteReferenceRecord)e.ChildRecord.ParentRecord).ReferenceRecordingItems);
        }
        private void showScoreFeedback(double score)
        {
            string scoreText;

            if (score <= 5)
            {
                scoreText = ProjectConstants.SUPER_SCORE_TEXT;
            }
            else if (score <= 10)
            {
                scoreText = ProjectConstants.EXCELLENT_SCORE_TEXT;
            }
            else if (score <= 30)
            {
                scoreText = ProjectConstants.GOOD_SCORE_TEXT;
            }
            else if (score <= 50)
            {
                scoreText = ProjectConstants.FAIR_SCORE_TEXT;
            }
            else
            {
                scoreText = ProjectConstants.POOR_SCORE_TEXT;
            }

            this.m_parent.SetTextFeedback(scoreText);

            ApplicationSpeech.speakText(scoreText);
        }
 internal void setMessage(string pMessage)
 {
     // InvokeRequired required compares the thread ID of the
     // calling thread to the thread ID of the creating thread.
     // If these threads are different, it returns true.
     if (m_parent.calibrationRecordingStatus.InvokeRequired)
     {
         setMessageCallback d = new setMessageCallback(setMessage);
         m_parent.calibrationRecordingStatus.Invoke(d, new object[] { pMessage });
     }
     else
     {
         m_parent.calibrationRecordingStatus.Text = pMessage;
         ApplicationSpeech.speakText(pMessage);
     }
 }
Ejemplo n.º 4
0
        private void startRecording()
        {
            StartingRecordingTimerEvent(this, new TimerEventArgs(recordingBeatCounter, (recordingBeatCounter / m_beatsPerBar), (recordingBeatCounter % m_beatsPerBar) + 1));

            string[] rows = m_IntroductoryMessage.Split(',');

            if (rows.Length > 1)
            {
                int length = rows.Length;

                for (int i = 0; i < length; i = i + 2)
                {
                    ApplicationSpeech.speakText(rows[i]);
                    System.Threading.Thread.Sleep(Convert.ToInt32(rows[i + 1]));
                }
            }

            /*
             * ApplicationSpeech.speakText("Start Tapping");
             * System.Threading.Thread.Sleep(100);
             * ApplicationSpeech.speakText("1");
             * System.Threading.Thread.Sleep(200);
             * ApplicationSpeech.speakText("2");
             * System.Threading.Thread.Sleep(200);
             * ApplicationSpeech.speakText("3");
             * System.Threading.Thread.Sleep(200);
             * ApplicationSpeech.speakText("4");
             * System.Threading.Thread.Sleep(200);
             */
            if (m_UseMP3Music)
            {
                m_MP3PLayer.play();
            }

            //                ApplicationSpeech.speakText("Start Tapping");

            startRecordingTimer();
        }
Ejemplo n.º 5
0
 private void applicationStartSpeech()
 {
     ApplicationSpeech.speakText(ProjectConstants.APPLICATION_START_MESSAGE);
 }