Exemple #1
0
	/// <summary>
	/// Processes a table selection (either via a mouse press or programmatically 
	/// from selectTableIndex() by getting the next selection's data out of the 
	/// data and displaying it on the form. </summary>
	/// <param name="index"> the index of the delay table info to display on the form. </param>
	private void processLeftTableSelection(int index, bool tryToSave)
	{
		if (index == -1)
		{
			return;
		}

		if (tryToSave && (checkInput() > 0))
		{
			if (__currentIndex > -1)
			{
				selectLeftTableIndex(__currentIndex, false, false);
			}
			return;
		}

		// if gotten this far, then the delay table can be saved back
		// (if it has changed)
		saveDelayTable();

		__currentIndex = index;

		StateMod_DelayTable dt = (StateMod_DelayTable) __worksheetL.getRowData(index);

		updateRightTable(dt);
	}
        /// <summary>
        /// Selects the desired ID in the left table and displays the appropriate data
        /// in the remainder of the window. </summary>
        /// <param name="id"> the identifier to select in the list. </param>
        public virtual void selectID(string id)
        {
            int rows = __worksheet.getRowCount();
            StateMod_RiverNetworkNode rnn = null;

            for (int i = 0; i < rows; i++)
            {
                rnn = (StateMod_RiverNetworkNode)__worksheet.getRowData(i);
                if (rnn.getID().Trim().Equals(id.Trim()))
                {
                    selectTableIndex(i);
                    return;
                }
            }
        }