コード例 #1
0
        /// <summary>
        /// A private Event Handler that is called whenever the NewCellSelected event is fired.
        /// Ensures that the window receives all of the necessary information for a new cell being selected.
        /// </summary>
        private void HandleNewCellSelected()
        {
            window.GetSelection(out int col, out int row);
            string cellName = toCellName(col, row);
            object contents = spreadsheet.GetCellContents(cellName);

            if (contents is Formula)
            {
                window.SelectedNewCell("=" + contents.ToString());
                return;
            }
            window.SelectedNewCell(contents.ToString());
        }