private void FillGrid(Dictionary <KeyValuePair <string, string>, double> dynamicBCTDictionary) { int indexCol = 1; // views DevAge.Drawing.BorderLine border = new DevAge.Drawing.BorderLine(Color.DarkBlue, 1); DevAge.Drawing.RectangleBorder cellBorder = new DevAge.Drawing.RectangleBorder(border, border); CellColorFromValue viewNormal = new CellColorFromValue(_ectAnalysis.LoadOnFirstLayerCase * 9.81 / 10); // convert mass in kg to load in daN viewNormal.Border = cellBorder; foreach (string keyHumidity in McKeeFormula.HumidityCoefDictionary.Keys) { int indexRow = 1; foreach (string keyStorage in McKeeFormula.StockCoefDictionary.Keys) { gridDynamicBCT[indexRow, indexCol] = new SourceGrid.Cells.Cell( string.Format("{0:0.00}", dynamicBCTDictionary[new KeyValuePair <string, string>(keyStorage, keyHumidity)])); gridDynamicBCT[indexRow, indexCol].View = viewNormal; ++indexRow; } ++indexCol; } gridDynamicBCT.Invalidate(); }
private void FillGrid(Dictionary<KeyValuePair<string, string>, double> dynamicBCTDictionary) { int indexCol = 1; // views DevAge.Drawing.BorderLine border = new DevAge.Drawing.BorderLine(Color.DarkBlue, 1); DevAge.Drawing.RectangleBorder cellBorder = new DevAge.Drawing.RectangleBorder(border, border); CellColorFromValue viewNormal = new CellColorFromValue(_ectAnalysis.LoadOnFirstLayerCase * 9.81 / 10); // convert mass in kg to load in daN viewNormal.Border = cellBorder; foreach (string keyHumidity in McKeeFormula.HumidityCoefDictionary.Keys) { int indexRow = 1; foreach (string keyStorage in McKeeFormula.StockCoefDictionary.Keys) { gridDynamicBCT[indexRow, indexCol] = new SourceGrid.Cells.Cell( string.Format("{0:0.00}", dynamicBCTDictionary[new KeyValuePair<string,string>(keyStorage, keyHumidity)])); gridDynamicBCT[indexRow, indexCol].View = viewNormal; ++indexRow; } ++indexCol; } gridDynamicBCT.Invalidate(); }