コード例 #1
0
 private void AddPersistentColumn(string colName, int width, ColumnType columnType, string description,
                                  RenderTableCell renderer)
 {
     if (persistentTable == null)
     {
         persistentTable   = new DataTable2(Name, Description);
         persistentColInds = new List <int>();
     }
     persistentTable.AddColumn(colName, width, columnType, description, renderer);
     persistentColInds.Add(columnNames.Count - 1);
     persistentColInds.Sort();
 }
コード例 #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;
 }