/// <summary> /// 过滤查找 /// </summary> public void filterSearch() { String sText = m_searchTextBox.Text.ToUpper(); m_grid.beginUpdate(); m_grid.clearRows(); int row = 0; CList <Security> securities = SecurityService.FilterCode(sText); if (securities != null) { int rowCount = securities.size(); for (int i = 0; i < rowCount; i++) { Security security = securities.get(i); FCGridRow gridRow = new FCGridRow(); m_grid.addRow(gridRow); gridRow.addCell(0, new FCGridStringCell(security.m_code)); gridRow.addCell(1, new FCGridStringCell(security.m_name)); row++; } } securities.delete(); m_grid.endUpdate(); }
/// <summary> /// 销毁对象 /// </summary> public void delete() { if (m_values != null) { m_values.clear(); m_values = null; } }
/// <summary> /// 销毁资源 /// </summary> public virtual void delete() { if (!m_isDeleted) { clear(); if (m_columns != null) { m_columns.delete(); m_columns = null; } if (m_keys != null) { m_keys.delete(); m_keys = null; } if (m_rows != null) { m_rows.delete(); m_rows = null; } m_isDeleted = true; } }
public static CList <Security> FilterCode(String text) { CList <Security> securities = new CList <Security>(); foreach (Security gSecurity in SecurityService.m_codedMap.Values) { if (gSecurity.m_name != null) { if (text.Length == 0) { securities.push_back(gSecurity); } else { if (gSecurity.m_code.ToUpper().IndexOf(text) == 0 || gSecurity.m_name.ToUpper().IndexOf(text) == 0 || gSecurity.m_pingyin.ToUpper().IndexOf(text) == 0) { securities.push_back(gSecurity); } } } } return(securities); }
/// <summary> /// 创建行 /// </summary> /// <param name="ary">数组</param> /// <param name="size">长度</param> public FCDataRow(double[] ary, int size) { m_values = new CList <double>(); m_values.addranges(ary, size); }
/// <summary> /// 创建行 /// <param name="capacity">容量</param> /// <param name="step">步长</param> /// </summary> public FCDataRow(int capacity, int step) { m_values = new CList <double>(); m_values.set_capacity(capacity); m_values.set_step(capacity); }
/// <summary> /// 创建行 /// </summary> public FCDataRow() { m_values = new CList <double>(); }