Exemplo n.º 1
0
        public void UI_LineDrawing(object sender, LineDrawEventArgs e)
        {
            IUserInterface ui = (IUserInterface)sender;

            // Even if the URI marking is disabled, scanning procedure must be done because
            // characters marked as URI already must be unmarked after disabling URI marking.

            /*DO_NOT -->
            *  if( doc.MarksUri == false )
            *       return;
            *  <-- DO_NOT*/

            // mark up all URIs in the logical line
            int scrernLineHeadIndex = ui.View.GetLineHeadIndex(e.LineIndex);
            int logicalLineIndex    = ui.Document.GetLineIndexFromCharIndex(scrernLineHeadIndex);

            e.ShouldBeRedrawn = MarkOrUnmarkOneLine(ui.Document, logicalLineIndex, ui.MarksUri);
        }
Exemplo n.º 2
0
        public void UI_LineDrawing(object sender, LineDrawEventArgs e)
        {
            IUserInterface ui = (IUserInterface)sender;

            Debug.Assert(ui.Document == _Document);

            // Mark up all URIs in the logical line
            int scrernLineHeadIndex = ui.View.GetLineHeadIndex(e.LineIndex);
            int logicalLineIndex    = ui.Document.GetLineIndexFromCharIndex(scrernLineHeadIndex);

            if (logicalLineIndex != e.LineIndex &&
                logicalLineIndex == _LastDrawnLogicalLineIndex)
            {
                return;                 // except continuation lines
            }
            _LastDrawnLogicalLineIndex = logicalLineIndex;

            e.ShouldBeRedrawn = MarkOneLine(_Document,
                                            logicalLineIndex,
                                            true);
        }