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

📄 frmtemplateproperties.frm

📁 Data monkey是一个强大的是数据传输和转换应用程序。使用DataMonkey用户可以把复杂的文本文件格式
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmTemplateProperties 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "Template Properties"
   ClientHeight    =   2820
   ClientLeft      =   48
   ClientTop       =   336
   ClientWidth     =   4392
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   2820
   ScaleWidth      =   4392
   ShowInTaskbar   =   0   'False
   StartUpPosition =   3  'Windows Default
   Begin VB.TextBox txtTemplateName 
      Height          =   285
      Left            =   1380
      TabIndex        =   7
      Top             =   120
      Width           =   2895
   End
   Begin VB.TextBox txtProjectName 
      Height          =   285
      Left            =   1740
      TabIndex        =   6
      Top             =   1800
      Width           =   2535
   End
   Begin VB.CommandButton btnCancel 
      Cancel          =   -1  'True
      Caption         =   "&Cancel"
      Height          =   375
      Left            =   2400
      TabIndex        =   4
      Top             =   2280
      Width           =   855
   End
   Begin VB.CommandButton btnOk 
      Caption         =   "&Ok"
      Default         =   -1  'True
      Height          =   375
      Left            =   3420
      TabIndex        =   3
      Top             =   2280
      Width           =   855
   End
   Begin VB.CheckBox chkEditLinks 
      Caption         =   "Allow users to define Links"
      Height          =   255
      Left            =   120
      TabIndex        =   2
      Top             =   1380
      Width           =   2355
   End
   Begin VB.CheckBox chkEditOutput 
      Caption         =   "Allow users to select/create new Output Schemas"
      Height          =   255
      Left            =   120
      TabIndex        =   1
      Top             =   960
      Width           =   4035
   End
   Begin VB.CheckBox chkEditInput 
      Caption         =   "Allow users to edit Input Lines/Fields"
      Height          =   255
      Left            =   120
      TabIndex        =   0
      Top             =   540
      Width           =   3375
   End
   Begin VB.Label Label2 
      Caption         =   "Template Name"
      Height          =   255
      Left            =   120
      TabIndex        =   8
      Top             =   120
      Width           =   1215
   End
   Begin VB.Label Label1 
      Caption         =   "Default project name:"
      Height          =   255
      Left            =   120
      TabIndex        =   5
      Top             =   1800
      Width           =   1515
   End
End
Attribute VB_Name = "frmTemplateProperties"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
' 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

Dim mTemplate As CWizardTemplate

Private Sub btnCancel_Click()
    Unload Me
End Sub

Private Sub btnOk_Click()
    GFormReturnValue = vbOK

    If Me.txtTemplateName = "" Then
        MsgBox "You must supply a name for the template", vbInformation Or vbOKOnly, "Missing Data"
        Exit Sub
    End If
    
    mTemplate.AllowInputEdit = chkEditInput
    mTemplate.AllowLinkEdit = Me.chkEditLinks
    mTemplate.AllowOutputEdit = Me.chkEditOutput
    mTemplate.name = Me.txtTemplateName
    mTemplate.Import.name = Me.txtProjectName

    Dim ols As COutputLinks
    
    ' It doesn't make sense to preserve links.
    For Each ols In mTemplate.Import.GetOutputLinksManager
        While ols.Count > 0
            ols.Remove 1
        Wend
    Next
    
    ' If we are adding new OutputItems, delete the current ones.
    If mTemplate.AllowOutputEdit Then
        While mTemplate.Import.GetOutputLinksManager.Count > 0
            mTemplate.Import.GetOutputLinksManager.Remove 1
        Wend
    End If

    ' If we are adding new Input Items delete the current ones.
    If mTemplate.AllowInputEdit Then
        While mTemplate.Import.GetCheckPoints.Count > 0
            mTemplate.Import.GetCheckPoints.Remove 1
        Wend
    End If

    Unload Me
End Sub

Private Sub Form_Load()
    Me.left = (Screen.Width - Me.Width) / 2
    Me.top = (Screen.Height - Me.Height) / 2
    GFormReturnValue = vbCancel
End Sub

Public Sub Initialize(owner As CWizardTemplate)
    
    If owner Is Nothing Then Exit Sub
    Set mTemplate = owner

    Me.chkEditInput = IIf(owner.AllowInputEdit, 1, 0)
    Me.chkEditLinks = IIf(owner.AllowLinkEdit, 1, 0)
    Me.chkEditOutput = IIf(owner.AllowOutputEdit, 1, 0)
    Me.txtProjectName = owner.Import.name
    
    If owner.name = "" Then
        Me.txtTemplateName = owner.Import.name
    Else
        Me.txtTemplateName = owner.name
    End If
    
End Sub

Private Sub Form_Unload(Cancel As Integer)
    Set mTemplate = Nothing
End Sub

⌨️ 快捷键说明

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