SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftMask/OCX 7.0 - Masked Edit Control
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftPrintPreview/DLL 2.0 - Print Preview Control (discontinued)
SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftDirectory 3.5 - File/Folder Control (discontinued)
SftMask/OCX 7.0 - Masked Edit Control
SftOptions 1.0 - Registry/INI Control (discontinued)
SftPrintPreview/OCX 1.0 - Print Preview Control (discontinued)
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftTabs/NET 6.0 - Tab Control (discontinued)
SftTree/NET 2.0 - Tree Control
Compares two objects and returns a value indicating whether one is less than, equal to, or greater than the other.
Class: SortAscending
Namespace: Softelvdm.SftTreeNET
Assembly: Softelvdm.SftTreeNET
public int Compare( object x, object y );
Public Function Compare( ByVal x As Object, ByVal y As Object ) As Integer
x
The first object to compare. This object can be cast into an ItemClass object.
y
The second object to compare. This object can be cast into an ItemClass object.
The collating sequence. Return a value greater than zero to indicate that x is greater than y, equal to 0 to indicate that x and y are equal, a value less than zero to indicate x is less than y.
Compares two objects and returns a value indicating whether one is less than, equal to, or greater than the other.
} public sealed class SortTagObjectAsLongAscending : IComparer { private int m_ColumnIndex; public SortTagObjectAsLongAscending(int ColumnIndex) { m_ColumnIndex = ColumnIndex; } public int Compare(object x, object y) { ItemClass i1 = (ItemClass)x; ItemClass i2 = (ItemClass)y; long l1 = (long) i1.Cells[m_ColumnIndex].TagObject; long l2 = (long) i2.Cells[m_ColumnIndex].TagObject; if (l1 > l2) return 1; if (l1 < l2) return -1; return 0;
Public NotInheritable Class SortTagObjectAsLongAscending Implements IComparer Private m_ColumnIndex As Integer Public Sub New(ByVal ColumnIndex As Integer) m_ColumnIndex = ColumnIndex End Sub Function Compare(ByVal x As Object, ByVal y As Object) As Integer Implements IComparer.Compare Dim i1 As ItemClass = x Dim i2 As ItemClass = y Dim l1 As Long = i1.Cells(m_ColumnIndex).TagObject Dim l2 As Long = i2.Cells(m_ColumnIndex).TagObject If l1 > l2 Then Return 1 If l1 < l2 Then Return -1 Return 0 End Function
See Also SortAscending Class | Classes | SftTree/NET 2.0