/// <summary> /// Fills the input name column combo box according to the type of station, ID, /// interval, data type, and input type that is selected. </summary> /// <param name="row"> the row of the data type column that is being dealt with </param> /// <param name="station_type"> the type of the station (column _COL_STATION_TYPE) </param> /// <param name="id"> the ID of the structure (column _COL_ID) </param> /// <param name="interval_string"> The data interval (column _COL_INTERVAL). </param> /// <param name="data_type"> The data type (column _COL_DATA_TYPE). </param> /// <param name="input_type"> The input type (column _COL_INPUT_TYPE). </param> public virtual void fillInputNameColumn(int row, string station_type, string id, string interval_string, string data_type, string input_type) { System.Collections.IList input_names = new List <object>(); int interval = TimeInterval.MONTH; if (interval_string.Equals("Day", StringComparison.OrdinalIgnoreCase)) { interval = TimeInterval.DAY; } if (StringUtil.indexOfIgnoreCase(data_type, "Output", 0) > 0) { // Have an output time series... if (station_type.Equals(StateMod_Util.STATION_TYPE_DIVERSION, StringComparison.OrdinalIgnoreCase) || station_type.Equals(StateMod_Util.STATION_TYPE_STREAMGAGE, StringComparison.OrdinalIgnoreCase) || station_type.Equals(StateMod_Util.STATION_TYPE_STREAMESTIMATE, StringComparison.OrdinalIgnoreCase) || station_type.Equals(StateMod_Util.STATION_TYPE_INSTREAM_FLOW, StringComparison.OrdinalIgnoreCase)) { if (interval == TimeInterval.MONTH) { // Substitute base name later... input_names.Add("*.b43"); // Explicitly specify base name... input_names.Add(__dataset.getBaseName() + ".b43"); } else { // Daily... input_names.Add("*.b49"); // Explicitly specify base name... input_names.Add(__dataset.getBaseName() + ".b49"); } } else if (station_type.Equals(StateMod_Util.STATION_TYPE_RESERVOIR, StringComparison.OrdinalIgnoreCase)) { if (interval == TimeInterval.MONTH) { // Substitute base name later... input_names.Add("*.b44"); // Explicitly specify base name... input_names.Add(__dataset.getBaseName() + ".b44"); } else { // Daily... input_names.Add("*.b50"); // Explicitly specify base name... input_names.Add(__dataset.getBaseName() + ".b50"); } } else if (station_type.Equals(StateMod_Util.STATION_TYPE_WELL, StringComparison.OrdinalIgnoreCase)) { if (interval == TimeInterval.MONTH) { // Substitute base name later... input_names.Add("*.b42"); // Explicitly specify base name... input_names.Add(__dataset.getBaseName() + ".b42"); } else { // Daily... input_names.Add("*.b65"); // Explicitly specify base name... input_names.Add(__dataset.getBaseName() + ".b65"); } } } else { // Need to pick the correct input name from the type... // This needs to be relative if at all possible! string ext = StateMod_DataSet.lookupTimeSeriesDataFileExtension(StringUtil.getToken(data_type, " ", 0, 0), interval); if (!ext.Equals("")) { input_names.Add("*." + ext); } string filename = __dataset.getComponentDataFileNameFromTimeSeriesDataType(StringUtil.getToken(data_type, " ", 0, 0), interval); if (!filename.Equals("")) { input_names.Add(filename); } } // Always add a Browse... input_names.Add(__BROWSE_INPUT_NAME_ABSOLUTE); input_names.Add(__BROWSE_INPUT_NAME_RELATIVE); if (__worksheet != null) { __worksheet.setCellSpecificJComboBoxValues(row, _COL_INPUT_NAME, input_names); System.Collections.IList v = __worksheet.getCellSpecificJComboBoxValues(row, _COL_INPUT_NAME); string s = null; if (v == null || v.Count == 0) { s = ""; } else { s = (string)v[0]; } setInternalValueAt(s, row, _COL_INPUT_NAME); } }