private void endCalibrationProcess() { m_CalibratorForm = null; m_WiiMoteWrapper.InfraRedAppearedEvent -= buildInfraRedCalibrationArray; setCalibratedWarperData(); m_IsCalibrated = true; if (CalibrateFinishedEvent != null) { CalibrateFinishedEvent(this, EventArgs.Empty); } }
public void CalibrateScreen(WiiMoteWrapper i_WiiMoteWrapper) { if (m_CalibratorForm == null) { m_CalibratorForm = new CalibrationForm(m_WiiMoteWrapper); m_IsCalibrated = false; m_WiiMoteWrapper = i_WiiMoteWrapper; m_CurrentCalibrationCounter = 0; buildStaticCalibrationArray(); m_WiiMoteWrapper.InfraRedAppearedEvent += buildInfraRedCalibrationArray; m_CalibratorForm.FormClosed += onCalibrationFormClosed; m_CalibratorForm.CalibrationHeightChangedEvent += onCalibrationAreaChanged; m_CalibratorForm.Show(); } }
public Calibrator(WiiMoteWrapper i_WiiMoteWraper) { m_IsCalibrated = false; m_CurrentCalibrationCounter = 0; m_TopCalibrationMargin = 0; m_ScreenWidth = Screen.PrimaryScreen.Bounds.Width; m_ScreenHeight = Screen.PrimaryScreen.Bounds.Height; m_StaticCalibrationArrayX = new float[4]; m_StaticCalibrationArrayY = new float[4]; m_InfraRedCalibrationArrayX = new float[4]; m_InfraRedCalibrationArrayY = new float[4]; m_Warper = new Warper(); m_WiiMoteWrapper = i_WiiMoteWraper; m_CalibratorForm = null; }
private void onCalibrationFormClosed(object i_Sender, EventArgs i_Args) { m_WiiMoteWrapper.InfraRedAppearedEvent -= buildInfraRedCalibrationArray; m_CalibratorForm = null; }