/// <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> /// <param name="native">方法库</param> public SecurityFilterResult(INativeBase native) { m_native = native; String xmlPath = DataCenter.GetAppPath() + "\\config\\SecurityFilterResult.xml"; m_xml = new UIXmlEx(); m_xml.Native = m_native; m_xml.LoadFile(xmlPath, null); m_window = m_xml.FindControl("windowSFR") as WindowEx; m_gridFilterResult = m_xml.FindControl("gridFilterResult") as GridA; m_gridFilterResult.RowStyle.Font = new FONT("SimSun", 14, false, false, false); m_gridCellClick = new GridCellMouseEvent(GridCellClick); m_gridFilterResult.RegisterEvent(m_gridCellClick, EVENTID.GRIDCELLCLICK); //注册秒表 m_timerEvent = new ControlTimerEvent(CallTimer); m_window.RegisterEvent(m_timerEvent, EVENTID.TIMER); //注册点击事件 RegisterEvents(m_window); }