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
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
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