Beispiel #1
0
        /// <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();
        }
Beispiel #2
0
 /// <summary>
 /// 销毁对象
 /// </summary>
 public void delete()
 {
     if (m_values != null)
     {
         m_values.clear();
         m_values = null;
     }
 }
Beispiel #3
0
 /// <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;
     }
 }
Beispiel #4
0
        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);
        }
Beispiel #5
0
 /// <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);
 }
Beispiel #6
0
 /// <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);
 }
Beispiel #7
0
 /// <summary>
 /// 创建行
 /// </summary>
 public FCDataRow()
 {
     m_values = new CList <double>();
 }