Esempio n. 1
0
        private int ShiftIndex(int index, int shift, bool isColumnIndex)
        {
            var incrementCandidate = index;

            incrementCandidate += shift;
            var max = isColumnIndex ? _indexHelper.GetMaxColumnIndex(_key) : _indexHelper.GetMaxRowIndex(_key);

            if (incrementCandidate > max)
            {
                index = 0;
            }
            else if (incrementCandidate < 0)
            {
                index = max;
            }
            else
            {
                index += shift;
            }
            return(index);
        }