Пример #1
0
        /// <summary>
        /// Crearte and display a highlighted range at specified position on worksheet
        /// </summary>
        /// <param name="range">Position to add highlighted range</param>
        /// <returns>Instance of highlight range on worksheet</returns>
        public HighlightRange AddHighlightRange(RangePosition range)
        {
            for (int i = 0; i < highlightRanges.Count; i++)
            {
                var hr = highlightRanges[i];

                if (hr.StartPos == range.StartPos && hr.EndPos == range.EndPos)
                {
                    highlightRanges.RemoveAt(i);
                }
            }

            var rrange = new HighlightRange(this, range);

            AddHighlightRange(rrange);

            return(rrange);
        }
Пример #2
0
 internal void AddHighlightRange(HighlightRange range)
 {
     this.highlightRanges.Add(range);
     this.RequestInvalidate();
 }