Пример #1
0
 private VirtualDataTable2(SerializationInfo info, StreamingContext context) : base(info, context)
 {
     GetRowData        = (Func <int, object[]>)info.GetValue("GetRowData", typeof(Func <int, object[]>));
     rowCount          = info.GetInt32("rowCount");
     persistentColInds = (List <int>)info.GetValue("persistentColInds", typeof(List <int>));
     persistentTable   = (DataTable2)info.GetValue("persistentTable", typeof(DataTable2));
 }
Пример #2
0
 private VirtualDataTable2(SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
     GetRowData = (Func<int, object[]>) info.GetValue("GetRowData", typeof (Func<int, object[]>));
     rowCount = info.GetInt32("rowCount");
     persistentColInds = (List<int>) info.GetValue("persistentColInds", typeof (List<int>));
     persistentTable = (DataTable2) info.GetValue("persistentTable", typeof (DataTable2));
 }
Пример #3
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();
 }
Пример #4
0
 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;
 }
Пример #5
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();
        }