/// <summary> /// Sets up the data to be displayed in the table. </summary> /// <param name="data"> a Vector of StateMod_StreamEstimate_Coefficients objects from /// which the data to be be displayed in the table will be gathered. </param> private void setupData(System.Collections.IList data) { int num = 0; int size = data.Count; StateMod_StreamEstimate_Coefficients coeff = null; __data = new System.Collections.IList[__COLUMNS]; for (int i = 0; i < __COLUMNS; i++) { __data[i] = new List <object>(); } string id = null; int rowCount = 0; int M = 0; int N = 0; for (int i = 0; i < size; i++) { coeff = (StateMod_StreamEstimate_Coefficients)data[i]; id = coeff.getID(); M = coeff.getM(); N = coeff.getN(); num = M < N ? N : M; for (int j = 0; j < num; j++) { __data[COL_ID].Add(id); if (j < N) { __data[COL_STREAM_NAME].Add(new double?(coeff.getCoefn(j))); __data[COL_UPSTREAM_GAGE].Add(coeff.getUpper(j)); } else { __data[COL_STREAM_NAME].Add(new double?(-999)); __data[COL_UPSTREAM_GAGE].Add(""); } if (j < M) { __data[COL_GAIN_TERM_PRO].Add(new double?(coeff.getProratnf())); __data[COL_GAIN_TERM_WT].Add(new double?(coeff.getCoefm(j))); __data[COL_GAIN_TERM_GAGE_ID].Add(coeff.getFlowm(j)); } else { __data[COL_GAIN_TERM_PRO].Add(new double?(-999)); __data[COL_GAIN_TERM_WT].Add(new double?(-999)); __data[COL_GAIN_TERM_GAGE_ID].Add(""); } rowCount++; } } _rows = rowCount; }