ccmdnewaction.cls

来自「Data monkey是一个强大的是数据传输和转换应用程序。使用DataMonk」· CLS 代码 · 共 107 行

CLS
107
字号
VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
END
Attribute VB_Name = "CCmdNewAction"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Option Explicit

Private mIndex As Integer
Public Function GetSpecificDescription() As String
    Dim x As String
    
    x = "This command has yet to be defined"
    GetSpecificDescription = x

End Function

Public Function EditProperties() As Integer
'    frmCMDIfProperties.initialize Me
'    frmCMDIfProperties.Show vbModal
    EditProperties = vbCancel 'GFormReturnValue
End Function

Public Function CmdType() As Integer

    '****************************
    ' Not really a valid command.
    '****************************
    
    CmdType = eCmdTypes.cmdNewAction
    
End Function

Public Property Let Index(ByVal vData As Integer)
    mIndex = vData
End Property

Public Property Get Index() As Integer
    Index = mIndex
End Property

Public Function Execute(ByRef Value As Variant, Optional CnvType As eODBCDataType = dtNONE) As Boolean
    Execute = True
End Function

Public Function Load()

    On Error GoTo eHandler
    
    Load = False
    Dim item As String, Value As Variant, retVal As Integer
    
    '***************************************
    ' Get the next line from the input file.
    '***************************************
    
    Do
        retVal = Archive.GetNextItem(item, Value)
        
        Select Case item
        
            Case "INDEX"
                mIndex = Value
                
            Case Else
                '*****************************************
                ' This line contains an unrecognized item.
                '*****************************************
                
                Archive.AddError
                
        End Select
    Loop While retVal <> cENDITEM And retVal <> cERROR
    
    Load = True
    
    Exit Function
    
eHandler:
    MsgBox Error(Err)
    Exit Function

End Function
Public Function Save() As Boolean
    
    On Error GoTo eHandler
    
    Save = False

    Archive.SaveItem aiBEGINACTION, InputID.GetName(CmdType())
    Archive.SaveItem aiVALUE, "INDEX", mIndex
    Archive.SaveItem aiENDITEM, InputID.GetName(CmdType())
    
    Save = True
    Exit Function
    
eHandler:
    MsgBox Error(Err)
    Exit Function
    
End Function


⌨️ 快捷键说明

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