public void deleteReferenceRecordSelected(DataGridViewRow lTrainingSegmentRow, DataGridViewRow lReferenceRow, int index) { TrainingSegmentInfo trainingSegmentInfo = (TrainingSegmentInfo)lTrainingSegmentRow.DataBoundItem; WiimoteReferenceRecord referenceRecord = (WiimoteReferenceRecord)lReferenceRow.DataBoundItem; DialogResult result; if (referenceRecord.getNumberOfWiimoteReferenceRecordingItems() > 0) { result = MessageBox.Show("There are Multiple Recording Items for this Reference. Do you want to delete all the Recording Items ?", "Need User Input", MessageBoxButtons.YesNo); } else { trainingSegmentInfo.deleteWiimoteReferenceRecord(index); return; } if (result == System.Windows.Forms.DialogResult.Yes) { referenceRecord.deleleAllWiimoteReferenceRecordingItems(); trainingSegmentInfo.deleteChildItem(index); } this.m_parent.SetTrainingSegmentInfoBindingSource(WiimoteDataStore.getWiimoteDataStore().TrainingSegmentInfoRecords); }
public void initialize() { DummyRecord = new WiimoteReferenceRecord(); WiimoteReferenceRecordingItem lDummyRecordingItem = m_WiimoteDataStore.DummyRecord.addWiimoteReferenceRecordingItem("Dummy", CalibrationOption.None, DateTime.Now, false); DummyRecord.SelectedRecordingItem = lDummyRecordingItem; }
public void deleteReferenceRecordingItemSelected(DataGridViewRow l_TableReferenceRow, int index) { WiimoteReferenceRecord referenceRecord = (WiimoteReferenceRecord)l_TableReferenceRow.DataBoundItem; referenceRecord.deleteChildItem(index); this.m_parent.SetReferenceRecordingItemDataBindingSource(referenceRecord.ReferenceRecordingItems); }
public void newReferenceRecordingItemSelected(DataGridViewRow l_TableReferenceRow) { WiimoteReferenceRecord referenceRecord = (WiimoteReferenceRecord)l_TableReferenceRow.DataBoundItem; string referenceRecordingItemName = referenceRecord.RecordName + "_" + ProjectConstants.UNTITLED_REFERENCE_RECORDING_PREFIX + "_" + (referenceRecord.HighestRecordingItemIndex + 1); IWiimoteChildRecord wiimoteRecord = (IWiimoteChildRecord)referenceRecord.addWiimoteReferenceRecordingItem(referenceRecordingItemName, getCalibrationSelection(), m_RecordStartTime); this.m_parent.SetReferenceRecordingItemDataBindingSource(referenceRecord.ReferenceRecordingItems); }
public void loadTrainingVideoInfoData() { WiimoteDataStore dataStore = WiimoteDataStore.getWiimoteDataStore(); int lNumRecords = dataStore.getNumberOfWiimoteReferenceRecords(); mVideoInfoList = new List <TrainingSegmentInfo>(); for (int lIndex = 0; lIndex < lNumRecords; lIndex++) { WiimoteReferenceRecord lReferenceRecord = dataStore.getWiimoteReferenceRecord(lIndex); if (lReferenceRecord.VideoPath != null && lReferenceRecord.VideoPath.CompareTo("") != 0) { mVideoInfoList.Add(new TrainingSegmentInfo(lReferenceRecord)); } } }
public string getScore(IWiimoteChildRecord l_SelectedReferenceRow, IWiimoteChildRecord l_SelectedPlayRow, out double score, out double stars) { string lMatlabOptionCode; WiimoteReferenceRecord lReferenceRecord = (WiimoteReferenceRecord)l_SelectedReferenceRow.ParentRecord; //TODO : This is a temporary hack to check for Pop Overs if (lReferenceRecord.RecordName.Contains("Intro")) { lMatlabOptionCode = ProjectConstants.TRAINING_MATLAB_OPTION_PARTS_OF_THE_FEET; } else if (lReferenceRecord.RecordName.Contains("Toe")) { lMatlabOptionCode = ProjectConstants.TRAINING_MATLAB_OPTION_TOE_STANDS; } else { lMatlabOptionCode = ProjectConstants.TRAINING_MATLAB_OPTION_POP_OVERS; } return(MatlabWiimoteWrapper.calculateScore(lMatlabOptionCode, l_SelectedPlayRow.FilePath, out score, out stars)); }
public void referenceRecordRowReferencePageSelected(DataGridViewRow l_TableReferenceRow) { WiimoteReferenceRecord referenceRecord = (WiimoteReferenceRecord)l_TableReferenceRow.DataBoundItem; this.m_parent.SetReferenceRecordingItemDataBindingSource(referenceRecord.ReferenceRecordingItems); }