⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 comparebytime.vb

📁 vb开发的车间调度程序
💻 VB
字号:
Public Class CompareByTime             '实现一个比较接口,按照工序的相对剩余时间从大到小给所有工序进行排序
    Implements IComparer

    Public Function Compare(ByVal o1 As Object, ByVal o2 As Object) As Integer Implements System.Collections.IComparer.Compare
        If (o1 Is Nothing) And (o2 Is Nothing) Then Return 0

        If (o1 Is Nothing) Then Return 1
        If (o2 Is Nothing) Then Return -1

        Dim p1 As CProcess = CType(o1, CProcess)
        Dim p2 As CProcess = CType(o2, CProcess)

        If p1.timeRelation < p2.timeRelation Then
            Return 1

        ElseIf p1.timeRelation = p2.timeRelation Then
            Return 0
        Else
            Return -1
        End If
    End Function






End Class


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -