Public Class rtnMsg : Inherits SingletonBase(Of rtnMsg)
    Private Const LoginMsg4 As String = "部分需要的元件不存在或未註冊"
    Private Const LoginMsg3 As String = "連線中"
    Private Const LoginMsg2 As String = "登入失敗(帳號或密碼錯誤)"
    Private Const LoginMsg1 As String = "連線失敗(主機連不到等錯誤)"
    Private Const LoginMsg0 As String = "連線參數錯誤(缺少帳號或密碼等錯誤)"
    Private Const LoginMsg_1 As String = "交易物件產生失敗(缺少IceGlobalTradeAPI.ocx或未註冊)"
    Private Const LoginMsg_2 As String = "TouchanceLogin尚未呼叫過"
    Private Const LoginMsg_3 As String = "無權限"
    Private Const LoginMsg_4 As String = "交易物件不存在(缺少某個Adapter OCX或未註冊)"
    Private Const LoginMsg_5 As String = "暫存資料存取失敗"
    Private Const LoginMsg_6 As String = "權限資料錯誤"
    Private Const LoginMsg_7 As String = "該Session已經連線"
    Private Const LoginMsg_ As String = "未定義的錯誤"

    Private Const POMsg1 As String = "成功，表示此委託單已經送出"
    Private Const POMsg0 As String = "連線未完成 或 記憶體錯誤"
    Private Const POMsg_1 As String = "密碼未填"
    Private Const POMsg_2 As String = "帳號未填(分公司代碼)"
    Private Const POMsg_3 As String = "帳號未填"
    Private Const POMsg_6 As String = "商品代碼未填"
    Private Const POMsg_7 As String = "買賣別未填"
    Private Const POMsg_8 As String = "委託別未填"
    Private Const POMsg_9 As String = "盤別未填"
    Private Const POMsg_10 As String = "價格別未填"
    Private Const POMsg_11 As String = "委託價未填"
    Private Const POMsg_12 As String = "數量未填"
    Private Const POMsg_13 As String = "User Key未填"
    Private Const POMsg_14 As String = "倉別未填"
    Private Const POMsg_15 As String = "商品年月未填"
    Private Const POMsg_16 As String = "C/P未填"
    Private Const POMsg_17 As String = "Strike Price未填"
    Private Const POMsg_23 As String = "市場別未填"
    Private Const POMsg_24 As String = "交易所未填"
    Private Const POMsg_25 As String = "停損價未填"
    Private Const POMsg_26 As String = "當沖未填"
    Private Const POMsg_27 As String = "代表刪單改價減量時,找不到對應的可刪改回報"
    Private Const POMsg_29 As String = "委託書號未填"
    Private Const POMsg_50 As String = "Type錯誤"
    Private Const POMsg_51 As String = "數量錯誤"
    Private Const POMsg_52 As String = "委託書號錯誤"
    Private Const POMsg_53 As String = "帳號錯誤"
    Private Const POMsg_54 As String = "商品ID錯誤"
    Private Const POMsg_55 As String = "委託別錯誤"
    Private Const POMsg_56 As String = "買賣別錯誤"
    Private Const POMsg_57 As String = "價格別錯誤"
    Private Const POMsg_58 As String = "價格錯誤"
    Private Const POMsg_59 As String = "市場別錯誤"
    Private Const POMsg_60 As String = "盤別錯誤"
    Private Const POMsg_61 As String = "當沖錯誤"
    Private Const POMsg_62 As String = "新平倉錯誤"
    Private Const POMsg_88 As String = "簽章錯誤"
    Private Const POMsg_100 As String = "委託取消"
    Private Const POMsg_101 As String = "委託測試"
    Private Const POMsg_200 As String = "帳號號對應的連線已經移除，請重新登入!"
    Private Const POMsg_ As String = "未定義的錯誤"

    Public Function getLoginMsg(cnt As Int32) As String
        Dim str As String = String.Empty
        Select Case cnt
            Case 4 : str = LoginMsg4
            Case 3 : str = LoginMsg3
            Case 2 : str = LoginMsg2
            Case 1 : str = LoginMsg1
            Case 0 : str = LoginMsg0
            Case -1 : str = LoginMsg_1
            Case -2 : str = LoginMsg_2
            Case -3 : str = LoginMsg_3
            Case -4 : str = LoginMsg_4
            Case -5 : str = LoginMsg_5
            Case -6 : str = LoginMsg_6
            Case -7 : str = LoginMsg_7
            Case Else : str = LoginMsg_
        End Select
        Return str
    End Function
    Public Function getProcessOrder(cnt As Int32) As String
        Dim str As String = String.Empty
        Select Case cnt
            Case 1 : str = POMsg1
            Case 0 : str = POMsg0
            Case -1 : str = POMsg_1
            Case -2 : str = POMsg_2
            Case -3 : str = POMsg_3
            Case -6 : str = POMsg_6
            Case -7 : str = POMsg_7
            Case -8 : str = POMsg_8
            Case -9 : str = POMsg_9
            Case -10 : str = POMsg_10
            Case -11 : str = POMsg_11
            Case -12 : str = POMsg_12
            Case -13 : str = POMsg_13
            Case -14 : str = POMsg_14
            Case -15 : str = POMsg_15
            Case -16 : str = POMsg_16
            Case -17 : str = POMsg_17
            Case -23 : str = POMsg_23
            Case -24 : str = POMsg_24
            Case -25 : str = POMsg_25
            Case -26 : str = POMsg_26
            Case -27 : str = POMsg_27
            Case -29 : str = POMsg_29
            Case -50 : str = POMsg_50
            Case -51 : str = POMsg_51
            Case -52 : str = POMsg_52
            Case -53 : str = POMsg_53
            Case -54 : str = POMsg_54
            Case -55 : str = POMsg_55
            Case -56 : str = POMsg_56
            Case -57 : str = POMsg_57
            Case -58 : str = POMsg_58
            Case -59 : str = POMsg_59
            Case -60 : str = POMsg_60
            Case -61 : str = POMsg_61
            Case -62 : str = POMsg_62
            Case -88 : str = POMsg_88
            Case -100 : str = POMsg_100
            Case -101 : str = POMsg_101
            Case -200 : str = POMsg_200
            Case Else : str = POMsg_
        End Select
        Return str
    End Function
End Class
