C# 클래스 VietOCR.NET.Controls.CustomPaintTextBox

This is the class that handles painting the wavy red lines. It utilizes the NativeWindow to find out when it needs to draw
상속: System.Windows.Forms.NativeWindow, IDisposable
파일 보기 프로젝트 열기: nguyenq/VietOCR3.NET

공개 메소드들

메소드 설명
CustomPaintTextBox ( TextBoxBase clientTextBox, SpellCheckHelper speller ) : System
Dispose ( ) : void
ForcePaint ( ) : void

The textbox is not redrawn much, so this will force the textbox to call the custom paint function. Otherwise, text can be entered and no wavy red lines will appear

보호된 메소드들

메소드 설명
Dispose ( bool disposing ) : void
WndProc ( System &m ) : void

This is called when the textbox is being redrawn. When it is, for the textbox to get refreshed, call its default paint method and then call our method

비공개 메소드들

메소드 설명
CustomPaint ( ) : void

Gets the ranges of chars that represent the spelling errors and then draw a wavy red line underneath them.

DrawWave ( Point start, Point end ) : void

Draws the wavy red line given a starting point and an ending point

GetOffsets ( TextBoxBase &curTextBox, int startingIndex, int endingIndex, System.Windows.Forms.RichTextBox tempRTB ) : Point

Determines the X and Y offsets to use based on font height last letter width

TextBoxBase_ClientSizeChanged ( object sender, System e ) : void

When the TextBoxBase is resized, this will reset the objects that are used to draw the wavy, red line. Without this, anything outside of the original bounds will not be drawn

TextBoxBase_HandleCreated ( object sender, System e ) : void

Reassign this classes handle and the graphics object anytime the textbox's handle is changed

메소드 상세

CustomPaintTextBox() 공개 메소드

public CustomPaintTextBox ( TextBoxBase clientTextBox, SpellCheckHelper speller ) : System
clientTextBox System.Windows.Forms.TextBoxBase
speller SpellCheckHelper
리턴 System

Dispose() 공개 메소드

public Dispose ( ) : void
리턴 void

Dispose() 보호된 메소드

protected Dispose ( bool disposing ) : void
disposing bool
리턴 void

ForcePaint() 공개 메소드

The textbox is not redrawn much, so this will force the textbox to call the custom paint function. Otherwise, text can be entered and no wavy red lines will appear
public ForcePaint ( ) : void
리턴 void

WndProc() 보호된 메소드

This is called when the textbox is being redrawn. When it is, for the textbox to get refreshed, call its default paint method and then call our method
protected WndProc ( System &m ) : void
m System The windows message
리턴 void