C# Class SIL.FieldWorks.TE.TeEditorialChecks.CheckRenderingControl

Inheritance: System.Windows.Forms.UserControl, ISelectableView, IChecksViewWrapperView, IVwNotifyChange, IMessageFilter
显示文件 Open project: sillsdev/FieldWorks

Protected Properties

Property Type Description
m_cache SIL.FieldWorks.FDO.FdoCache
m_gridSorter CheckGridListSorter
m_list List
m_mainWnd SIL.FieldWorks.Common.Framework.FwMainWnd
m_persistence SIL.FieldWorks.Common.Controls.Persistence
m_prevResultRow int
m_prevStatusBarText string
m_sortedColumn System.Windows.Forms.DataGridViewColumn
m_tsStrComparer SIL.FieldWorks.Common.COMInterfaces.TsStringComparer
m_userChangedColumnWidth bool

Public Methods

Method Description
ActivateView ( ) : void

CheckDisposed ( ) : void

Check to see if the object has been disposed. All public Properties and Methods should call this before doing anything else.

This method is thread safe.

CheckRenderingControl ( SIL.FieldWorks.FDO.FdoCache cache, FwMainWnd mainWnd ) : System

DeactivateView ( ) : void

PreFilterMessage ( Message &m ) : bool

If the user presses Alt-Down or Alt-Up, then we want to change the selected row in the grid to the previous or next.

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

SetColWidthsFromReg ( RegistryKey key ) : void

Sets the grid's column widths by reading their saved values from the registry.

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Executes in two distinct scenarios. 1. If disposing is true, the method has been called directly or indirectly by a user's code via the Dispose method. Both managed and unmanaged resources can be disposed. 2. If disposing is false, the method has been called by the runtime from inside the finalizer and you should not reference (access) other managed objects, as they already have been garbage collected. Only unmanaged resources can be disposed.

If any exceptions are thrown, that is fine. If the method is being done in a finalizer, it will be ignored. If it is thrown by client code calling Dispose, it needs to be handled by fixing the bug. If subclasses override this method, they should call the base implementation.

GetPreSortRow ( ) : object

This method should be overridden.

GetRegSettingColName ( System.Windows.Forms.DataGridViewColumn col, bool forFillWeight ) : string

OnHandleCreated ( EventArgs e ) : void

OnLoadSettings ( RegistryKey key ) : void

RestorePreSortRow ( object restoreRow ) : void

This method should be overridden.

SetColOrderFromReg ( RegistryKey key ) : void

Sort ( System.Windows.Forms.DataGridViewColumn column, bool toggleDirection, int defaultSortCol ) : void

Sorts the specified column.

Private Methods

Method Description
ChangeZoomPercent ( float oldFactor, float newFactor ) : void
HandleRenderingGridSizeChanged ( object sender, EventArgs e ) : void

This delegate is necessary because when the OnLoadSettings method is called, the rendering grid has no width, and because columns in the rendering grid may have an AutoSizeMode of fill, their widths should not be set from the registry until the grid has it's full width. Therefore, this delegate will keep checking the current width of the grid with the width of the grid as it was last saved in the registry. When the two are equal, then this method will call the method to set all the column widths to those saved in the registry. I know, this is sort of kludgy, but this is yet one more limitation in the .Net framework I don't know how else to work around. -- DDO

HandleZoomPercentageChanged ( object sender, ZoomPercentageChangedEventArgs e ) : void

Called when the zoom percentage changed.

OnSaveSettings ( RegistryKey key ) : void

Method Details

ActivateView() public method

public ActivateView ( ) : void
return void

CheckDisposed() public method

Check to see if the object has been disposed. All public Properties and Methods should call this before doing anything else.
This method is thread safe.
public CheckDisposed ( ) : void
return void

CheckRenderingControl() public method

public CheckRenderingControl ( SIL.FieldWorks.FDO.FdoCache cache, FwMainWnd mainWnd ) : System
cache SIL.FieldWorks.FDO.FdoCache
mainWnd SIL.FieldWorks.Common.Framework.FwMainWnd
return System

DeactivateView() public method

public DeactivateView ( ) : void
return void

Dispose() protected method

Executes in two distinct scenarios. 1. If disposing is true, the method has been called directly or indirectly by a user's code via the Dispose method. Both managed and unmanaged resources can be disposed. 2. If disposing is false, the method has been called by the runtime from inside the finalizer and you should not reference (access) other managed objects, as they already have been garbage collected. Only unmanaged resources can be disposed.
If any exceptions are thrown, that is fine. If the method is being done in a finalizer, it will be ignored. If it is thrown by client code calling Dispose, it needs to be handled by fixing the bug. If subclasses override this method, they should call the base implementation.
protected Dispose ( bool disposing ) : void
disposing bool true to release both managed and unmanaged resources; false to release only unmanaged resources.
return void

GetPreSortRow() protected method

This method should be overridden.
protected GetPreSortRow ( ) : object
return object

GetRegSettingColName() protected static method

protected static GetRegSettingColName ( System.Windows.Forms.DataGridViewColumn col, bool forFillWeight ) : string
col System.Windows.Forms.DataGridViewColumn
forFillWeight bool
return string

OnHandleCreated() protected method

protected OnHandleCreated ( EventArgs e ) : void
e System.EventArgs
return void

OnLoadSettings() protected method

protected OnLoadSettings ( RegistryKey key ) : void
key Microsoft.Win32.RegistryKey
return void

PreFilterMessage() public method

If the user presses Alt-Down or Alt-Up, then we want to change the selected row in the grid to the previous or next.
public PreFilterMessage ( Message &m ) : bool
m System.Windows.Forms.Message
return bool

PropChanged() public method

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

RestorePreSortRow() protected method

This method should be overridden.
protected RestorePreSortRow ( object restoreRow ) : void
restoreRow object
return void

SetColOrderFromReg() protected method

protected SetColOrderFromReg ( RegistryKey key ) : void
key Microsoft.Win32.RegistryKey
return void

SetColWidthsFromReg() public method

Sets the grid's column widths by reading their saved values from the registry.
public SetColWidthsFromReg ( RegistryKey key ) : void
key Microsoft.Win32.RegistryKey
return void

Sort() protected method

Sorts the specified column.
protected Sort ( System.Windows.Forms.DataGridViewColumn column, bool toggleDirection, int defaultSortCol ) : void
column System.Windows.Forms.DataGridViewColumn The column on which to sort. When this is the column that /// is already the sorted column, then use toggleDirection to specify whether or /// not the column should be sorted in reverse order.
toggleDirection bool true to toggle the sort direction when column is /// already the current sort column. Otherwise, false. When column is not the current /// sort column, then this flag is ignored. ///
defaultSortCol int The index of the column to sort on when there /// isn't any sort information that can be read from the registry.
return void

Property Details

m_cache protected_oe property

protected FdoCache,SIL.FieldWorks.FDO m_cache
return SIL.FieldWorks.FDO.FdoCache

m_gridSorter protected_oe property

protected CheckGridListSorter,SIL.FieldWorks.TE.TeEditorialChecks m_gridSorter
return CheckGridListSorter

m_list protected_oe property

protected List m_list
return List

m_mainWnd protected_oe property

protected FwMainWnd,SIL.FieldWorks.Common.Framework m_mainWnd
return SIL.FieldWorks.Common.Framework.FwMainWnd

m_persistence protected_oe property

protected Persistence,SIL.FieldWorks.Common.Controls m_persistence
return SIL.FieldWorks.Common.Controls.Persistence

m_prevResultRow protected_oe property

protected int m_prevResultRow
return int

m_prevStatusBarText protected_oe property

protected string m_prevStatusBarText
return string

m_sortedColumn protected_oe property

protected DataGridViewColumn,System.Windows.Forms m_sortedColumn
return System.Windows.Forms.DataGridViewColumn

m_tsStrComparer protected_oe property

protected TsStringComparer,SIL.FieldWorks.Common.COMInterfaces m_tsStrComparer
return SIL.FieldWorks.Common.COMInterfaces.TsStringComparer

m_userChangedColumnWidth protected_oe property

protected bool m_userChangedColumnWidth
return bool