public DrawDatasetValues(Vector2 pos, DataTable inSet) { this.dt = inSet; x = y = classifier = ""; this.tableName = inSet.TableName; List<string> tStringlist = new List<string>(); List<string> tClassList = new List<string>(); foreach(DataColumn dc in dt.Columns) { if(hasValue(dt, dc)) { if(!isClassifier(dt, dc)) { tClassList.Add(dc.ColumnName); } else { tStringlist.Add(dc.ColumnName); } } } if(tStringlist.Count > 0) { mcLists = new MultipleChoiceList(new Rect(pos.x+5.0f, pos.y+5.0f, 205.0f, 250.0f), tStringlist.ToArray(), 2, dt.TableName); } if(tClassList.Count > 0) { clLists = new MultipleChoiceList(new Rect(pos.x + mcLists.posGetter.width + 15.0f, pos.y+5.0f, 205.0f, 250.0f), tClassList.ToArray(), 1, dt.TableName); } this.scrollRect = new Rect(pos.x, pos.y, (mcLists.posGetter.width*2)+20.0f, (clLists.posGetter.y + clLists.posGetter.height)+(clLists.posGetter.y + clLists.posGetter.height)/2); this.totalRect = new Rect(pos.x, pos.y, (mcLists.posGetter.width*2)+20.0f, clLists.posGetter.height); }
public DrawDatasetValues(Vector2 pos, DataTable inSet) { this.dt = inSet; x = y = classifier = ""; this.tableName = inSet.TableName; List <string> tStringlist = new List <string>(); List <string> tClassList = new List <string>(); foreach (DataColumn dc in dt.Columns) { if (hasValue(dt, dc)) { if (!isClassifier(dt, dc)) { tClassList.Add(dc.ColumnName); } else { tStringlist.Add(dc.ColumnName); } } } if (tStringlist.Count > 0) { mcLists = new MultipleChoiceList(new Rect(pos.x + 5.0f, pos.y + 5.0f, 205.0f, 250.0f), tStringlist.ToArray(), 2, dt.TableName); } if (tClassList.Count > 0) { clLists = new MultipleChoiceList(new Rect(pos.x + mcLists.posGetter.width + 15.0f, pos.y + 5.0f, 205.0f, 250.0f), tClassList.ToArray(), 1, dt.TableName); } this.scrollRect = new Rect(pos.x, pos.y, (mcLists.posGetter.width * 2) + 20.0f, (clLists.posGetter.y + clLists.posGetter.height) + (clLists.posGetter.y + clLists.posGetter.height) / 2); this.totalRect = new Rect(pos.x, pos.y, (mcLists.posGetter.width * 2) + 20.0f, clLists.posGetter.height); }