Exemple #1
0
        /// <summary>
        /// 移除列
        /// </summary>
        /// <param name="colName">列名</param>
        public virtual void removeColumn(int colName)
        {
            int colIndex = getColumnIndex(colName);

            if (colIndex != -1)
            {
                int colSize     = m_columns.size();
                int removeIndex = -1;
                for (int i = 0; i < colSize; i++)
                {
                    int[] col   = m_columns.get(i);
                    int   name  = col[0];
                    int   index = col[1];
                    if (col[0] == colName)
                    {
                        removeIndex = i;
                    }
                    else
                    {
                        if (index > colIndex)
                        {
                            m_columns.set(i, new int[] { name, index - 1 });
                        }
                    }
                }
                m_columns.remove_at(removeIndex);
                for (int i = 0; i < m_rows.size(); i++)
                {
                    m_rows.get(i).remove(colIndex);
                    m_rows.get(i).fillEmpty(m_columns.size());
                }
            }
        }
Exemple #2
0
 /// <summary>
 /// 设置值
 /// </summary>
 /// <param name="index">索引</param>
 /// <param name="value">值</param>
 public void set(int index, double value)
 {
     m_values.set(index, value);
 }