示例#1
0
        internal SLCalculationCell Clone()
        {
            SLCalculationCell cc = new SLCalculationCell();

            cc.RowIndex     = this.RowIndex;
            cc.ColumnIndex  = this.ColumnIndex;
            cc.SheetId      = this.SheetId;
            cc.InChildChain = this.InChildChain;
            cc.NewLevel     = this.NewLevel;
            cc.NewThread    = this.NewThread;
            cc.Array        = this.Array;

            return(cc);
        }
示例#2
0
        /// <summary>
        /// Adds a calculation cell if it doesn't already exist
        /// </summary>
        /// <param name="cc"></param>
        internal void AddCalculationCell(SLCalculationCell cc)
        {
            bool bFound = false;

            foreach (SLCalculationCell calc in this.CalculationCells)
            {
                if (calc.SheetId == cc.SheetId && calc.RowIndex == cc.RowIndex && calc.ColumnIndex == cc.ColumnIndex)
                {
                    bFound = true;
                    break;
                }
            }

            if (!bFound)
            {
                this.CalculationCells.Add(cc.Clone());
            }
        }