?? cwizardtemplate.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 = "CWizardTemplate"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Attribute VB_Ext_KEY = "SavedWithClassBuilder" ,"Yes"
Attribute VB_Ext_KEY = "Top_Level" ,"Yes"
Attribute VB_Ext_KEY = "SavedWithClassBuilder6" ,"Yes"
' DataMonkey Data Conversion Application. Written by Theodore L. Ward
' Copyright (C) 2002 AstroComma Incorporated.
'
' This program is free software; you can redistribute it and/or
' modify it under the terms of the GNU General Public License
' as published by the Free Software Foundation; either version 2
' of the License, or (at your option) any later version.
'
' This program is distributed in the hope that it will be useful,
' but WITHOUT ANY WARRANTY; without even the implied warranty of
' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
' GNU General Public License for more details.
'
' You should have received a copy of the GNU General Public License
' along with this program; if not, write to the Free Software
' Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
' The author may be contacted at:
' TheodoreWard@Hotmail.com or TheodoreWard@Yahoo.com
Option Explicit
Private mAllowOutputEdit As Boolean
Private mAllowInputEdit As Boolean
Private mAllowLinkEdit As Boolean
Private mName As String
Private mImport As CImport
Public Function EditProperties() As Integer
frmTemplateProperties.Initialize Me
frmTemplateProperties.Show vbModal
EditProperties = GFormReturnValue
End Function
Public Property Let name(newVal As String)
mName = newVal
End Property
Public Property Get name() As String
name = mName
End Property
Public Property Let AllowOutputEdit(newVal As Boolean)
mAllowOutputEdit = newVal
End Property
Public Property Get AllowOutputEdit() As Boolean
AllowOutputEdit = mAllowOutputEdit
End Property
Public Property Let AllowInputEdit(newVal As Boolean)
mAllowInputEdit = newVal
End Property
Public Property Get AllowInputEdit() As Boolean
AllowInputEdit = mAllowInputEdit
End Property
Public Property Let AllowLinkEdit(newVal As Boolean)
mAllowLinkEdit = newVal
End Property
Public Property Get AllowLinkEdit() As Boolean
AllowLinkEdit = mAllowLinkEdit
End Property
Public Property Set Import(NewImport As CImport)
Set mImport = Nothing
Set mImport = NewImport
End Property
Public Property Get Import() As CImport
Set Import = mImport
End Property
' Load the gimport object from the file opened in the global Archive
' object.
Public Function Load(arc As CArchive) As Boolean
On Error GoTo eHandler
Dim i As Integer, retVal As Integer
Dim value As Variant, item As String
Load = False
Do
retVal = arc.GetNextItem(item, value)
' Error, log it, then exit with error.
If retVal = ArcRetType.cERROR Then
arc.AddError
GoTo terminate
' We are done with this object, leave.
ElseIf retVal = ArcRetType.cENDITEM Then
Exit Do
End If
Select Case item
Case "NAME"
mName = value
Case "ALLOWINPUTEDIT"
mAllowInputEdit = value
Case "ALLOWOUTPUTEDIT"
mAllowOutputEdit = value
Case "ALLOWLINKEDIT"
mAllowLinkEdit = value
Case "BEGIN IMPORT"
mImport.Load arc
End Select
Loop While True
Load = True
terminate:
Exit Function
eHandler:
LogError "CWizardTemplate", "Load", Error(Err)
End Function
' Save the import object.
Public Function Save(arc As CArchive) As Boolean
On Error GoTo eHandler
Dim i As Integer
Save = False
If Not arc.SaveItem(aiCOMMENT, "Wizard Template File") Then Exit Function
' Save the template properties first.
If Not arc.SaveItem(aiBEGINTEMPLATE, mName) Then Exit Function
If Not arc.SaveItem(aiVALUE, "NAME", mName) Then Exit Function
If Not arc.SaveItem(aiVALUE, "ALLOWINPUTEDIT", mAllowInputEdit) Then Exit Function
If Not arc.SaveItem(aiVALUE, "ALLOWOUTPUTEDIT", mAllowOutputEdit) Then Exit Function
If Not arc.SaveItem(aiVALUE, "ALLOWLINKEDIT", mAllowLinkEdit) Then Exit Function
' Save the import structure.
mImport.Save arc
' Write the end block for the entire Import.
arc.SaveItem aiENDITEM
Save = True
terminate:
Exit Function
eHandler:
LogError "CWizardTemplate", "Save", Error(Err)
End Function
Private Sub Class_Initialize()
Set mImport = New CImport
mAllowInputEdit = True
mAllowOutputEdit = True
mAllowLinkEdit = True
End Sub
Private Sub Class_Terminate()
Set mImport = Nothing
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -