ICSharpCode.TextEditor.TextArea.UpdateLine C# (CSharp) Method

UpdateLine() private method

private UpdateLine ( int line ) : void
line int
return void
		internal void UpdateLine(int line)
		{
			UpdateLines(0, line, line);
		}
		

Same methods

TextArea::UpdateLine ( int line, int begin, int end ) : void

Usage Example

示例#1
0
        public void UpdateCaretPosition()
        {
            if (textArea.MotherTextAreaControl.TextEditorProperties.LineViewerStyle == LineViewerStyle.FullRow && oldLine != line)
            {
                textArea.UpdateLine(oldLine);
                textArea.UpdateLine(line);
            }
            oldLine = line;


            if (hidden || textArea.MotherTextEditorControl.IsUpdating)
            {
                return;
            }
            try {
                if (!caretCreated)
                {
                    CreateCaret();
                }
                if (caretCreated)
                {
                    ValidateCaretPos();
                    int lineNr = this.line;
                    int xpos   = textArea.TextView.GetDrawingXPos(lineNr, this.column);
                    //LineSegment lineSegment = textArea.Document.GetLineSegment(lineNr);
                    Point pos = ScreenPosition;
                    if (xpos >= 0)
                    {
                        bool success = SetCaretPos(pos.X, pos.Y);
                        if (!success)
                        {
                            DestroyCaret();
                            caretCreated = false;
                            UpdateCaretPosition();
                        }
                    }
                    // set the input method editor location
                    if (ime == null)
                    {
                        ime = new Ime(textArea.Handle, textArea.Document.TextEditorProperties.Font);
                    }
                    else
                    {
                        ime.Font = textArea.Document.TextEditorProperties.Font;
                    }
                    ime.SetIMEWindowLocation(pos.X + 2,
                                             pos.Y);

                    currentPos = pos;
                }
            } catch (Exception e) {
                Console.WriteLine("Got exception while update caret position : " + e);
            }
        }
All Usage Examples Of ICSharpCode.TextEditor.TextArea::UpdateLine