コード例 #1
0
 public void FillPersistentData()
 {
     for (int i = 0; i < rowCount; i++)
     {
         object[] rowData = GetRowData(i);
         DataRow2 row     = persistentTable.NewRow();
         for (int j = 0; j < persistentColInds.Count; j++)
         {
             row[j] = rowData[persistentColInds[j]];
         }
         persistentTable.AddRow(row);
     }
 }
コード例 #2
0
ファイル: FindForm.cs プロジェクト: JurgenCox/compbio-base
 private ITableModel CreateTable(IList<int> searchInds, IList<int[]> matchingCols)
 {
     DataTable2 table = new DataTable2("Search results", "Search results");
     table.AddColumn("Row", 100, ColumnType.Integer, "");
     table.AddColumn("Columns", 80, ColumnType.Text, "");
     for (int index = 0; index < searchInds.Count; index++){
         int searchInd = searchInds[index];
         DataRow2 row = table.NewRow();
         row["Row"] = searchInd + 1;
         string[] colNames = new string[matchingCols[index].Length];
         for (int i = 0; i < matchingCols[index].Length; i++){
             colNames[i] = tableModel.GetColumnName(matchingCols[index][i]);
         }
         row["Columns"] = StringUtils.Concat(";", colNames);
         table.AddRow(row);
     }
     return table;
 }