/// <summary> /// 销毁方法 /// </summary> public void Dispose() { if (!m_isDisposed) { m_chart = null; if (m_gridFilterResult != null) { m_gridFilterResult.UnRegisterEvent(m_gridCellClick, EVENTID.GRIDCELLCLICK); m_gridCellClick = null; m_gridFilterResult = null; } if (m_window != null) { m_window.StopTimer(m_timerID); m_window.UnRegisterEvent(m_timerEvent, EVENTID.TIMER); m_timerEvent = null; m_window.Close(); m_window.Dispose(); m_window = null; } if (m_xml != null) { m_xml.Dispose(); m_xml = null; } m_isDisposed = true; } }
/// <summary> /// 销毁方法 /// </summary> public override void Dispose() { if (!IsDisposed) { int divsSize = m_divs.Count; for (int i = 0; i < divsSize; i++) { SandBoxCandleDiv div = m_divs[i]; if (div.Moving) { m_native.RemoveControl(div); } else { m_window.RemoveControl(div); } div.Dispose(); } m_divs.Clear(); if (m_window != null) { m_window.UnRegisterEvent(m_timerEvent, EVENTID.TIMER); m_timerEvent = null; m_window.StopTimer(m_timerID); m_window.Close(); m_window.Dispose(); m_window = null; } base.Dispose(); } }
/// <summary> /// 销毁方法 /// </summary> public override void Dispose() { if (!IsDisposed) { m_chart = null; if (m_gridTemplate != null) { m_gridTemplate.UnRegisterEvent(m_gridSelectedRowsChangedEvent, EVENTID.GRIDSELECTEDROWSCHANGED); m_gridSelectedRowsChangedEvent = null; m_gridTemplate = null; } if (m_securityFilterService != null) { m_securityFilterService.UnRegisterListener(m_securityFilterService.OperatorRequestID, m_securityFilterDataCallBackEvent); m_securityFilterDataCallBackEvent = null; m_securityFilterService = null; } if (m_window != null) { m_window.UnRegisterEvent(m_invokeEvent, EVENTID.INVOKE); m_invokeEvent = null; m_window.StopTimer(m_timerID); m_window.UnRegisterEvent(m_timerEvent, EVENTID.TIMER); m_timerEvent = null; m_window.Close(); m_window.Dispose(); m_window = null; } base.Dispose(); } }