public void SetObjectMode() { if (s_TheSensor != null) { if (m_SensorEventHandler != null) s_TheSensor.SensorInput -= m_SensorEventHandler; m_SensorEventHandler = new TDconnexion.TDxSensorInputEvent(ObjectMode); s_TheSensor.SensorInput += m_SensorEventHandler; m_AxisMode = AxisMapping.TDXOBJECTMODE; } }
public override void Unload() { if (m_TheInputDevice != null) m_TheInputDevice.Disconnect(); if ((m_KeyEventHandler != null) && (s_TheKeyBoard != null)) s_TheKeyBoard.KeyboardEventDOWN -= m_KeyEventHandler; if ((m_SensorEventHandler != null) && (s_TheSensor != null)) s_TheSensor.SensorInput -= m_SensorEventHandler; m_KeyEventHandler = null; m_SensorEventHandler = null; s_TheSensor = null; s_TheCamera = null; s_dLastHeight = 0; s_dDeltaHeight = 0; s_stopWatch = null; //check event interval of the input device s_TheCamera = null; s_WW = null; if (m_TheInputDevice != null) m_TheInputDevice.Release(); m_TheInputDevice = null; // Clean up, remove menu item // JBTODO: m_app.MenuStrip.Items.Remove(menuItem); base.Unload(); }
public void SetCameraMode() { if (s_TheSensor != null) { if (m_SensorEventHandler != null) s_TheSensor.SensorInput -= m_SensorEventHandler; m_SensorEventHandler = new TDconnexion.TDxSensorInputEvent(CameraMode); s_TheSensor.SensorInput += m_SensorEventHandler; m_AxisMode = AxisMapping.TDXCAMERAMODE; } }