1.先做三维场景的开挖功能(开挖功能是一个类),把m_sceneControl_Tracking、m_sceneControl_Tracked绑定给了SceneControl。
m_sceneControl.Action = Action3D.MeasureArea;
m_sceneControl.Tracking -= new Tracking3DEventHandler(m_sceneControl_Tracking);
m_sceneControl.Tracked -= new Tracked3DEventHandler(m_sceneControl_Tracked);
m_sceneControl.Tracking += new Tracking3DEventHandler(m_sceneControl_Tracking);
m_sceneControl.Tracked += new Tracked3DEventHandler(m_sceneControl_Tracked);
2.然后做三维面积量算功能(量算功能是另外一个类),需要把TrackingHandler、TrackedHandler重新绑定给m_sceneControl
// 注册事件
// Register the event
m_sceneControl.Tracking += new Tracking3DEventHandler(TrackingHandler);
m_sceneControl.Tracked += new Tracked3DEventHandler(TrackedHandler);
m_sceneControl.MouseUp += m_SceneControl_MouseUp;
问题:先做开挖,然后做面积量算,那么量算时还是开挖的功能,后做量算;
先做量算,然后做开挖,那么开挖时出现量算的黄色覆盖面。
怎么在开挖后或者量算后把SceneControl的所有事件绑定解除、再重新绑定给另外的事件。