C# 클래스 SIL.FieldWorks.TE.TeEditorialChecks.EditorialChecksGrid

EditorialChecksGrid encapsulates, primarily, behavior for the comments tooltip. For some reason, when the comments tooltip is displayed, the grid doesn't always receive mouse move (including CellMouseEnter and CellMouseLeave) events. However, the overridden WndProc method in this class, does receive the necessary mouse mouse events.
상속: SIL.FieldWorks.TE.TeEditorialChecks.CheckGrid
파일 보기 프로젝트 열기: sillsdev/FieldWorks

보호된 프로퍼티들

프로퍼티 타입 설명
m_mouseOverCell System.Windows.Forms.DataGridViewCell
m_toolTipCell System.Windows.Forms.DataGridViewCell

Private Properties

프로퍼티 타입 설명
DrawMissingGlyphImage bool
HandleToolTip void
HideToolTip void
OnPaint void
m_commentToolTip_Closed void
m_commentToolTip_Opened void
m_commentToolTip_TimerTick void

공개 메소드들

메소드 설명
EditorialChecksGrid ( ) : System

Initializes a new instance of the T:EditorialChecksGrid class.

IsRowIgnoredWithAnnotation ( int iRow ) : bool

Gets a value indicating whether or not the specified row in the grid is ignored and has an annotation associated with it.

PropChanged ( int hvo, int tag, int ivMin, int cvIns, int cvDel ) : void

ResetFonts ( ) : void

Clears the cached fonts used for the details column when there detail cells whose writing system is not the default vernacular. This cache automatically gets rebuilt as needed.

ShouldDrawCornerGlyph ( int iCol, int iRow ) : bool

Returns a value indicating whether or not the specified row and column correspond to the status column in a row that has an ignored result a resolution annotation.

보호된 메소드들

메소드 설명
Dispose ( bool disposing ) : void

Releases unmanaged and - optionally - managed resources

OnCellFormatting ( System.Windows.Forms.DataGridViewCellFormattingEventArgs e ) : void

Show checking errors with a status of irrelevant in gray text. Also make sure the font of font for the details column matches the font for the writing system of the cited text that goes in the current cell of that column. Finally, if the cited text is for a characters check and the character is a non-printable character, then show the character's name in red.

OnCellMouseEnter ( System.Windows.Forms.DataGridViewCellEventArgs e ) : void

When the mouse moves over the details column and the row is for a characters check error, then show a tooltip displaying info. about the invalid character.

OnCellMouseLeave ( System.Windows.Forms.DataGridViewCellEventArgs e ) : void

When the tooltip is showing then make sure tooltips for the cell we're leaving are hidden.

OnCellPainting ( System.Windows.Forms.DataGridViewCellPaintingEventArgs e ) : void

For checking errors that have become irrelevant (e.g. the user decided that a character cited as invalid is really valid), paint them with a strike-through line. Also draw a special icon if the cell is in a characters check result row, is the cited text and the cited text is a character that does not have a corresponding glyph in its writing system font.

OnCellRightMouseUp ( System.Windows.Forms.DataGridViewCellMouseEventArgs e ) : void

If we have a toolbar menu adapter, we want to show it as a context menu.

OnCellValueNeeded ( System.Windows.Forms.DataGridViewCellValueEventArgs e ) : void

OnScroll ( ScrollEventArgs e ) : void

Update the water mark when the grid scrolls.

OnSizeChanged ( EventArgs e ) : void

Update the water mark when the grid changes size.

WndProc ( Message &m ) : void

For some reason, when the comments tooltip is displayed, the grid doesn't always receive mouse move (including CellMouseEnter and CellMouseLeave) events. Therefore, we take what we can get to determine where the mouse is when the tooltip is opened, and the only reliable message we appear to get is the WM_NCHITTEST message.

비공개 메소드들

메소드 설명
DrawMissingGlyphImage ( SIL.FieldWorks.TE.TeEditorialChecks.CheckingError error, System.Windows.Forms.DataGridViewCellPaintingEventArgs e ) : bool

Determines wheter or not the contents of the details cell (specified by e.ColumnIndex) represents the cited text for a characters checking error. If so and the character does not have a glyph in the cited text's font, then just show image indicating that fact.

HandleToolTip ( ) : void

Handles the tooltip that shows the checking error comment.

HideToolTip ( ) : void

Hides the tool tip.

OnPaint ( PaintEventArgs e ) : void
m_commentToolTip_Closed ( object sender, System.Windows.Forms.ToolStripDropDownClosedEventArgs e ) : void

Handles the Closed event of the m_commentToolTip control.

m_commentToolTip_Opened ( object sender, EventArgs e ) : void

Handles the Opened event of the m_commentToolTip control.

m_commentToolTip_TimerTick ( object sender, EventArgs e ) : void

Handles the TimerTick event of the m_commentToolTip control.

메소드 상세

Dispose() 보호된 메소드

Releases unmanaged and - optionally - managed resources
protected Dispose ( bool disposing ) : void
disposing bool true to release both managed and unmanaged resources; /// false to release only unmanaged resources.
리턴 void

EditorialChecksGrid() 공개 메소드

Initializes a new instance of the T:EditorialChecksGrid class.
public EditorialChecksGrid ( ) : System
리턴 System

IsRowIgnoredWithAnnotation() 공개 메소드

Gets a value indicating whether or not the specified row in the grid is ignored and has an annotation associated with it.
public IsRowIgnoredWithAnnotation ( int iRow ) : bool
iRow int
리턴 bool

OnCellFormatting() 보호된 메소드

Show checking errors with a status of irrelevant in gray text. Also make sure the font of font for the details column matches the font for the writing system of the cited text that goes in the current cell of that column. Finally, if the cited text is for a characters check and the character is a non-printable character, then show the character's name in red.
protected OnCellFormatting ( System.Windows.Forms.DataGridViewCellFormattingEventArgs e ) : void
e System.Windows.Forms.DataGridViewCellFormattingEventArgs
리턴 void

OnCellMouseEnter() 보호된 메소드

When the mouse moves over the details column and the row is for a characters check error, then show a tooltip displaying info. about the invalid character.
protected OnCellMouseEnter ( System.Windows.Forms.DataGridViewCellEventArgs e ) : void
e System.Windows.Forms.DataGridViewCellEventArgs
리턴 void

OnCellMouseLeave() 보호된 메소드

When the tooltip is showing then make sure tooltips for the cell we're leaving are hidden.
protected OnCellMouseLeave ( System.Windows.Forms.DataGridViewCellEventArgs e ) : void
e System.Windows.Forms.DataGridViewCellEventArgs
리턴 void

OnCellPainting() 보호된 메소드

For checking errors that have become irrelevant (e.g. the user decided that a character cited as invalid is really valid), paint them with a strike-through line. Also draw a special icon if the cell is in a characters check result row, is the cited text and the cited text is a character that does not have a corresponding glyph in its writing system font.
protected OnCellPainting ( System.Windows.Forms.DataGridViewCellPaintingEventArgs e ) : void
e System.Windows.Forms.DataGridViewCellPaintingEventArgs
리턴 void

OnCellRightMouseUp() 보호된 메소드

If we have a toolbar menu adapter, we want to show it as a context menu.
protected OnCellRightMouseUp ( System.Windows.Forms.DataGridViewCellMouseEventArgs e ) : void
e System.Windows.Forms.DataGridViewCellMouseEventArgs
리턴 void

OnCellValueNeeded() 보호된 메소드

protected OnCellValueNeeded ( System.Windows.Forms.DataGridViewCellValueEventArgs e ) : void
e System.Windows.Forms.DataGridViewCellValueEventArgs
리턴 void

OnScroll() 보호된 메소드

Update the water mark when the grid scrolls.
protected OnScroll ( ScrollEventArgs e ) : void
e System.Windows.Forms.ScrollEventArgs
리턴 void

OnSizeChanged() 보호된 메소드

Update the water mark when the grid changes size.
protected OnSizeChanged ( EventArgs e ) : void
e System.EventArgs
리턴 void

PropChanged() 공개 메소드

public PropChanged ( int hvo, int tag, int ivMin, int cvIns, int cvDel ) : void
hvo int
tag int
ivMin int
cvIns int
cvDel int
리턴 void

ResetFonts() 공개 메소드

Clears the cached fonts used for the details column when there detail cells whose writing system is not the default vernacular. This cache automatically gets rebuilt as needed.
public ResetFonts ( ) : void
리턴 void

ShouldDrawCornerGlyph() 공개 메소드

Returns a value indicating whether or not the specified row and column correspond to the status column in a row that has an ignored result a resolution annotation.
public ShouldDrawCornerGlyph ( int iCol, int iRow ) : bool
iCol int
iRow int
리턴 bool

WndProc() 보호된 메소드

For some reason, when the comments tooltip is displayed, the grid doesn't always receive mouse move (including CellMouseEnter and CellMouseLeave) events. Therefore, we take what we can get to determine where the mouse is when the tooltip is opened, and the only reliable message we appear to get is the WM_NCHITTEST message.
protected WndProc ( Message &m ) : void
m System.Windows.Forms.Message
리턴 void

프로퍼티 상세

m_mouseOverCell 보호되어 있는 프로퍼티

DataGridViewCell which currently has the mouse over it.
protected DataGridViewCell,System.Windows.Forms m_mouseOverCell
리턴 System.Windows.Forms.DataGridViewCell

m_toolTipCell 보호되어 있는 프로퍼티

DataGridViewCell which currently has the tooltip up.
protected DataGridViewCell,System.Windows.Forms m_toolTipCell
리턴 System.Windows.Forms.DataGridViewCell