コード例 #1
0
        private void startRecording(IWiimoteReferenceRecord pReferenceRecord, int pPrerecordingTime)
        {
            //setup Wiimote recording

            WiimoteDataStore dataStore   = WiimoteDataStore.getWiimoteDataStore();
            string           lDateString = DateTime.Now.Month.ToString() + "_" + DateTime.Now.Day.ToString() + "_" + DateTime.Now.Year.ToString() +
                                           "_" + DateTime.Now.Hour.ToString() + "_" + DateTime.Now.Minute.ToString() + "_" + DateTime.Now.Second.ToString();

            string             lPlayname   = "Play" + pReferenceRecord.RecordName + "_" + lDateString;
            IWiimotePlayRecord lPlayRecord = mCurrentTrainingSegment.addWiimotePlayRecord(lPlayname, DateTime.Today, 0);

            mWiimotes.startRecording(lPlayRecord, false, this, "", false);
            mRecordingStarted = true;
            System.Threading.Thread.Sleep(pPrerecordingTime);
        }
コード例 #2
0
        private void recordCalibrationItem(IWiimoteCalibrationRecord l_Record)
        {
            try
            {
                m_Wiimotes.startRecording(l_Record, false, this, "", true);

                lock (calibrationRecordingSync) Monitor.Wait(calibrationRecordingSync);
            }
            catch (WiimoteCommunicationException ex)
            {
                throw ex;
            }
            catch (WiimoteConnectionException ex)
            {
                throw ex;
            }
        }
コード例 #3
0
 public void recordSelected(DataGridViewRow l_TableRow)
 {
     try
     {
         this.m_parent.TestTimer.Enabled = false;
         m_Wiimotes.startRecording(l_TableRow.DataBoundItem, Configuration.getConfiguration().MP3Option, this,
                                   "Start Tapping,100,1,200,2,200,3,200,4,200", true);
     }
     catch (WiimoteCommunicationException ex)
     {
         MessageBox.Show(ex.Message,
                         "Wiimote Connection Issue", MessageBoxButtons.OK,
                         MessageBoxIcon.Error);
     }
     catch (WiimoteConnectionException ex)
     {
         MessageBox.Show(ex.Message,
                         "Wiimote Connection Issue", MessageBoxButtons.OK,
                         MessageBoxIcon.Error);
     }
 }