fyiReporting.RdlDesign.RdlEditPreview.HighlightWord C# (CSharp) Method

HighlightWord() private method

private HighlightWord ( string text ) : void
text string
return void
        private void HighlightWord(string text)
        {
            // Remove all uses of our indicator
            scintilla1.IndicatorCurrent = SEARCH_INDICATOR_NUM;
            scintilla1.IndicatorClearRange(0, scintilla1.TextLength);

            // Update indicator appearance
            scintilla1.Indicators[SEARCH_INDICATOR_NUM].Style = IndicatorStyle.StraightBox;
            scintilla1.Indicators[SEARCH_INDICATOR_NUM].Under = true;
            scintilla1.Indicators[SEARCH_INDICATOR_NUM].ForeColor = Color.Orange;
            scintilla1.Indicators[SEARCH_INDICATOR_NUM].OutlineAlpha = 50;
            scintilla1.Indicators[SEARCH_INDICATOR_NUM].Alpha = 30;

            // Search the document
            scintilla1.TargetStart = 0;
            scintilla1.TargetEnd = scintilla1.TextLength;
            while (scintilla1.SearchInTarget(text) != -1)
            {
                // Mark the search results with the current indicator
                scintilla1.IndicatorFillRange(scintilla1.TargetStart, scintilla1.TargetEnd - scintilla1.TargetStart);

                // Search the remainder of the document
                scintilla1.TargetStart = scintilla1.TargetEnd;
                scintilla1.TargetEnd = scintilla1.TextLength;
            }
        }