Exemple #1
0
        /// <summary>
        /// Handles a request to change the selected cell.
        /// The view should handle highliting the new cell, itself.
        /// </summary>
        private void HandleSelectedCellChanged(string name)
        {
            window.DisplayContents(spreadsheet.GetCellContents(name).ToString());

            object val = spreadsheet.GetCellValue(name);
            string toDisplay;

            if (val.GetType().Equals(typeof(FormulaError)))
            {
                toDisplay = "FormErr";
            }
            else
            {
                toDisplay = val.ToString();
            }
            window.DisplayValue(name, toDisplay);
        }
Exemple #2
0
 /// <summary>
 /// Handles a request to change the selected cell.
 /// The view should handle highliting the new cell, itself.
 /// </summary>
 private void HandleSelectedCellChanged(string name)
 {
     selectedCell = name;
     window.DisplayContents(spreadsheet.GetCellContents(name).ToString());
     window.DisplayValue(spreadsheet.GetCellValue(name));
 }