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

ファイルを表示 Open project: sillsdev/FieldWorks Class Usage Examples

Public Methods

Method Description
AddComparer ( string propName, IComparer comparer ) : void

Adds a comparer for property propName.

Adding a comparer for a property allows that property to be sorted by the specified comparer (e.g. when the user clicks on the corresponding column header in a datagrid view.

CheckGridListSorter ( List list ) : System

Constructs a new CheckGridListSorter for the specified list of ICheckGridRowObjects objects.

ReadSortInfoFromReg ( RegistryKey key ) : bool

Reads the sort order information from the registry.

RowComparer ( object x, object y ) : int

Compares two objects and returns a value indicating whether one is less than, equal to, or greater than the other.

SetFirstSortPropName ( string propName, bool toggleDirection ) : void

Sort ( ) : void

Sorts the list using the current sort order.

Sort ( string sortPropName, bool toggleDirection ) : void

Sorts the list, making the specified property name the primary sort field and toggles the sort direction if that field is already in the sort order. If not, then the direction is ascending.

WriteSortInfoToReg ( RegistryKey key ) : void

Writes the sort order information to the registry.

Method Details

AddComparer() public method

Adds a comparer for property propName.
Adding a comparer for a property allows that property to be sorted by the specified comparer (e.g. when the user clicks on the corresponding column header in a datagrid view.
public AddComparer ( string propName, IComparer comparer ) : void
propName string Name of the property.
comparer IComparer The comparer object
return void

CheckGridListSorter() public method

Constructs a new CheckGridListSorter for the specified list of ICheckGridRowObjects objects.
public CheckGridListSorter ( List list ) : System
list List
return System

ReadSortInfoFromReg() public method

Reads the sort order information from the registry.
public ReadSortInfoFromReg ( RegistryKey key ) : bool
key Microsoft.Win32.RegistryKey
return bool

RowComparer() public method

Compares two objects and returns a value indicating whether one is less than, equal to, or greater than the other.
Neither nor /// implements the /// interface.-or- and are of different /// types and neither one can handle comparisons with the other.
public RowComparer ( object x, object y ) : int
x object The first object to compare.
y object The second object to compare.
return int

SetFirstSortPropName() public method

public SetFirstSortPropName ( string propName, bool toggleDirection ) : void
propName string
toggleDirection bool
return void

Sort() public method

Sorts the list using the current sort order.
public Sort ( ) : void
return void

Sort() public method

Sorts the list, making the specified property name the primary sort field and toggles the sort direction if that field is already in the sort order. If not, then the direction is ascending.
public Sort ( string sortPropName, bool toggleDirection ) : void
sortPropName string
toggleDirection bool
return void

WriteSortInfoToReg() public method

Writes the sort order information to the registry.
public WriteSortInfoToReg ( RegistryKey key ) : void
key Microsoft.Win32.RegistryKey
return void