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

📄 task.cls

📁 非常有用得编辑器软件源码
💻 CLS
字号:
VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
  Persistable = 0  'NotPersistable
  DataBindingBehavior = 0  'vbNone
  DataSourceBehavior  = 0  'vbNone
  MTSTransactionMode  = 0  'NotAnMTSObject
END
Attribute VB_Name = "Task"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Attribute VB_Ext_KEY = "SavedWithClassBuilder6" ,"Yes"
Attribute VB_Ext_KEY = "Top_Level" ,"No"
#Const DebugMode = 1


#If DebugMode Then
    Private mlClassDebugID As Long
#End If
Private mvarDescription As String
Private mvarTaskName As String
Private mvarDueDate As String
Private mvarStartDate As String
Private mvarTaskType As String
Private mvarDone As Boolean
Private mvarResponsible As String

Public Function ReadCode(ByVal Code As String) As Boolean

On Error GoTo 1

Dim rTaskName As String, rTaskType As String, rResponsible As String, rStartDate As String, rDueDate As String, rDone As Boolean, rDescription As String
Dim CodeBody As String

    CodeBody = Mid(Code, 4)

rTaskName = Mid(CodeBody, 1, InStr(1, CodeBody, "&!@#$1") - 1)
rTaskType = Mid(CodeBody, InStr(1, CodeBody, "&!@#$1") + 6, InStr(1, CodeBody, "&!@#$2") - InStr(1, CodeBody, "&!@#$1") - 6)
rResponsible = Mid(CodeBody, InStr(1, CodeBody, "&!@#$2") + 6, InStr(1, CodeBody, "&!@#$3") - InStr(1, CodeBody, "&!@#$2") - 6)
rStartDate = Mid(CodeBody, InStr(1, CodeBody, "&!@#$3") + 6, InStr(1, CodeBody, "&!@#$4") - InStr(1, CodeBody, "&!@#$3") - 6)
rDueDate = Mid(CodeBody, InStr(1, CodeBody, "&!@#$4") + 6, InStr(1, CodeBody, "&!@#$5") - InStr(1, CodeBody, "&!@#$4") - 6)
rDone = IIf(Mid(CodeBody, InStr(1, CodeBody, "&!@#$5") + 6, InStr(1, CodeBody, "&!@#$6") - InStr(1, CodeBody, "&!@#$5") - 6) = "True", True, False)
rDescription = Mid(CodeBody, InStr(1, CodeBody, "&!@#$6") + 6)

    Me.TaskName = rTaskName
    Me.TaskType = rReportType
    Me.Responsible = rResponsible
    Me.StartDate = rStartDate
    Me.DueDate = rDueDate
    Me.Done = rDone
    Me.Description = rDescription
    
    ReadCode = True
Exit Function
1
ReadCode = False
End Function

Public Function GenerateCode() As String

GenerateCode = "TSK" & _
               IIf(Me.TaskName = "", "A Task", Me.TaskName) & "&!@#$1" & _
               Me.TaskType & "&!@#$2" & _
               Me.Responsible & "&!@#$3" & _
               Me.StartDate & "&!@#$4" & _
               Me.DueDate & "&!@#%5" & _
               IIf(Me.Done = True, "True", "False") & _
               "&!@#%6" & Me.Description
               
End Function

Public Property Let Responsible(ByVal vData As String)
    mvarResponsible = vData
End Property


Public Property Get Responsible() As String
    Responsible = mvarResponsible
End Property



Public Property Let Done(ByVal vData As Boolean)
    mvarDone = vData
End Property


Public Property Get Done() As Boolean
    Done = mvarDone
End Property



Public Property Let TaskType(ByVal vData As String)
    mvarTaskType = vData
End Property


Public Property Get TaskType() As String
    TaskType = mvarTaskType
End Property



Public Property Let StartDate(ByVal vData As String)
    mvarStartDate = vData
End Property


Public Property Get StartDate() As String
    StartDate = mvarStartDate
End Property



Public Property Let DueDate(ByVal vData As String)
    mvarDueDate = vData
End Property


Public Property Get DueDate() As String
    DueDate = mvarDueDate
End Property



Public Property Let TaskName(ByVal vData As String)
    mvarTaskName = vData
End Property


Public Property Get TaskName() As String
Attribute TaskName.VB_UserMemId = 0
    TaskName = mvarTaskName
End Property



Public Property Let Description(ByVal vData As String)
    mvarDescription = vData
End Property


Public Property Get Description() As String
    Description = mvarDescription
End Property





Private Sub Class_Initialize()
    #If DebugMode Then
        mlClassDebugID = GetNextClassDebugID()
        Debug.Print "'" & TypeName(Me) & "' instance " & mlClassDebugID & " created"
    #End If
End Sub


Private Sub Class_Terminate()
    #If DebugMode Then
        Debug.Print "'" & TypeName(Me) & "' instance " & CStr(mlClassDebugID) & " is terminating"
    #End If
End Sub


#If DebugMode Then
    Public Property Get ClassDebugID()
        ClassDebugID = mlClassDebugID
    End Property
#End If

⌨️ 快捷键说明

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