Пример #1
0
        private void CalculateCell(ref bool isChangedCellValue, ICell cell)
        {
            if (cell == null)
            {
                throw new ArgumentNullException(nameof(cell));
            }

            if (!cell.IsCalculated && cell.Type != CellTypeEnum.Error)
            {
                string oldCellValue = cell.Value;

                try
                {
                    Converter.ConvertCellReferenceToValue(this, cell);
                    cell.CheckReferenceToItSelf();

                    CalculateNumbers(cell);
                }
                catch (Exception e)
                {
                    cell.SetError(e.Message);
                }

                if (!isChangedCellValue)
                {
                    isChangedCellValue = IsChangedValue(cell.Value, oldCellValue);
                }
            }
        }
Пример #2
0
        private void CalculateCell(ref bool isChangedCellValue, ICell cell)
        {
            if (cell == null) throw new ArgumentNullException(nameof(cell));

            if (!cell.IsCalculated && cell.Type != CellTypeEnum.Error)
            {
                string oldCellValue = cell.Value;

                try
                {
                    Converter.ConvertCellReferenceToValue(this, cell);
                    cell.CheckReferenceToItSelf();

                    CalculateNumbers(cell);
                }
                catch (Exception e)
                {
                    cell.SetError(e.Message);
                }

                if (!isChangedCellValue)
                {
                    isChangedCellValue = IsChangedValue(cell.Value, oldCellValue);
                }
            }
        }