C# Class 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.
Inheritance: SIL.FieldWorks.TE.TeEditorialChecks.CheckGrid
Afficher le fichier Open project: sillsdev/FieldWorks

Protected Properties

Свойство Type Description
m_mouseOverCell System.Windows.Forms.DataGridViewCell
m_toolTipCell System.Windows.Forms.DataGridViewCell

Private Properties

Свойство Type Description
DrawMissingGlyphImage bool
HandleToolTip void
HideToolTip void
OnPaint void
m_commentToolTip_Closed void
m_commentToolTip_Opened void
m_commentToolTip_TimerTick void

Méthodes publiques

Méthode Description
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.

Méthodes protégées

Méthode Description
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.

Private Methods

Méthode Description
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.

Method Details

Dispose() protected méthode

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.
Résultat void

EditorialChecksGrid() public méthode

Initializes a new instance of the T:EditorialChecksGrid class.
public EditorialChecksGrid ( ) : System
Résultat System

IsRowIgnoredWithAnnotation() public méthode

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
Résultat bool

OnCellFormatting() protected méthode

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
Résultat void

OnCellMouseEnter() protected méthode

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
Résultat void

OnCellMouseLeave() protected méthode

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
Résultat void

OnCellPainting() protected méthode

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
Résultat void

OnCellRightMouseUp() protected méthode

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
Résultat void

OnCellValueNeeded() protected méthode

protected OnCellValueNeeded ( System.Windows.Forms.DataGridViewCellValueEventArgs e ) : void
e System.Windows.Forms.DataGridViewCellValueEventArgs
Résultat void

OnScroll() protected méthode

Update the water mark when the grid scrolls.
protected OnScroll ( ScrollEventArgs e ) : void
e System.Windows.Forms.ScrollEventArgs
Résultat void

OnSizeChanged() protected méthode

Update the water mark when the grid changes size.
protected OnSizeChanged ( EventArgs e ) : void
e System.EventArgs
Résultat void

PropChanged() public méthode

public PropChanged ( int hvo, int tag, int ivMin, int cvIns, int cvDel ) : void
hvo int
tag int
ivMin int
cvIns int
cvDel int
Résultat void

ResetFonts() public méthode

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
Résultat void

ShouldDrawCornerGlyph() public méthode

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
Résultat bool

WndProc() protected méthode

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
Résultat void

Property Details

m_mouseOverCell protected_oe property

DataGridViewCell which currently has the mouse over it.
protected DataGridViewCell,System.Windows.Forms m_mouseOverCell
Résultat System.Windows.Forms.DataGridViewCell

m_toolTipCell protected_oe property

DataGridViewCell which currently has the tooltip up.
protected DataGridViewCell,System.Windows.Forms m_toolTipCell
Résultat System.Windows.Forms.DataGridViewCell