📄 frmdataitementry.frm
字号:
VERSION 5.00
Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.3#0"; "comctl32.ocx"
Begin VB.Form frmDataItemEntry
BorderStyle = 1 'Fixed Single
Caption = "Data Items"
ClientHeight = 5280
ClientLeft = 48
ClientTop = 336
ClientWidth = 5568
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 5280
ScaleWidth = 5568
Begin VB.CommandButton btnClose
Caption = "&Close"
Default = -1 'True
Height = 375
Left = 4680
TabIndex = 9
Top = 4800
Width = 735
End
Begin VB.ComboBox cboCheckpoints
Height = 315
Left = 1320
Style = 2 'Dropdown List
TabIndex = 6
Top = 120
Width = 4095
End
Begin VB.Frame fraActions
Caption = "Actions"
Height = 2295
Left = 120
TabIndex = 2
Top = 2400
Width = 5295
Begin VB.PictureBox picDnAction
Appearance = 0 'Flat
BackColor = &H80000005&
ForeColor = &H80000008&
Height = 255
Left = 4920
Picture = "frmDataItemEntry.frx":0000
ScaleHeight = 228
ScaleWidth = 228
TabIndex = 14
Top = 1080
Width = 255
End
Begin VB.PictureBox picUpAction
Appearance = 0 'Flat
BackColor = &H80000005&
ForeColor = &H80000008&
Height = 255
Left = 4920
Picture = "frmDataItemEntry.frx":0442
ScaleHeight = 228
ScaleWidth = 228
TabIndex = 13
Top = 600
Width = 255
End
Begin VB.CommandButton btnDelete
Caption = "&Delete"
Height = 375
Left = 4440
TabIndex = 10
Top = 1800
Width = 735
End
Begin VB.CommandButton btnAddStep
Caption = "&Add..."
Height = 375
Left = 2760
TabIndex = 5
Top = 1800
Width = 735
End
Begin VB.CommandButton btnEdit
Caption = "&Edit..."
Height = 375
Left = 3600
TabIndex = 4
Top = 1800
Width = 735
End
Begin ComctlLib.ListView lstActions
Height = 1455
Left = 120
TabIndex = 3
Top = 240
Width = 4695
_ExtentX = 8276
_ExtentY = 2561
View = 3
LabelEdit = 1
LabelWrap = 0 'False
HideSelection = 0 'False
_Version = 327682
ForeColor = -2147483640
BackColor = -2147483643
BorderStyle = 1
Appearance = 1
NumItems = 2
BeginProperty ColumnHeader(1) {0713E8C7-850A-101B-AFC0-4210102A8DA7}
Key = ""
Object.Tag = ""
Text = "Name"
Object.Width = 2540
EndProperty
BeginProperty ColumnHeader(2) {0713E8C7-850A-101B-AFC0-4210102A8DA7}
SubItemIndex = 1
Key = ""
Object.Tag = ""
Text = "Order"
Object.Width = 2540
EndProperty
End
End
Begin VB.Frame Frame1
Caption = "Data Items"
Height = 1815
Left = 120
TabIndex = 0
Top = 480
Width = 5295
Begin VB.PictureBox picDnDataItem
Appearance = 0 'Flat
BackColor = &H80000005&
ForeColor = &H80000008&
Height = 255
Left = 4440
Picture = "frmDataItemEntry.frx":0884
ScaleHeight = 228
ScaleWidth = 228
TabIndex = 12
Top = 1200
Width = 255
End
Begin VB.PictureBox picUpDataItem
Appearance = 0 'Flat
BackColor = &H80000005&
ForeColor = &H80000008&
Height = 255
Left = 4440
Picture = "frmDataItemEntry.frx":0CC6
ScaleHeight = 228
ScaleWidth = 228
TabIndex = 11
Top = 720
Width = 255
End
Begin VB.CommandButton btnAddItem
Caption = "&New"
Height = 375
Left = 4440
TabIndex = 8
Top = 240
Width = 735
End
Begin ComctlLib.ListView lstDataPoints
Height = 1455
Left = 120
TabIndex = 1
Top = 240
Width = 4215
_ExtentX = 7430
_ExtentY = 2561
View = 3
LabelEdit = 1
LabelWrap = 0 'False
HideSelection = 0 'False
_Version = 327682
ForeColor = -2147483640
BackColor = -2147483643
BorderStyle = 1
Appearance = 1
NumItems = 2
BeginProperty ColumnHeader(1) {0713E8C7-850A-101B-AFC0-4210102A8DA7}
Key = ""
Object.Tag = ""
Text = "Name"
Object.Width = 2558
EndProperty
BeginProperty ColumnHeader(2) {0713E8C7-850A-101B-AFC0-4210102A8DA7}
SubItemIndex = 1
Key = ""
Object.Tag = ""
Text = "Order"
Object.Width = 706
EndProperty
End
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "CheckPoint:"
Height = 195
Left = 120
TabIndex = 7
Top = 120
Width = 870
End
End
Attribute VB_Name = "frmDataItemEntry"
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
Option Explicit
Dim mDataPointBeingEdited As String
Private Sub btnAddItem_Click()
Dim dp As CInputField
'************************************
' Add a new item with a default name.
'************************************
Set dp = AddItem()
'***********************************************************
' If the item was successfully added, enable it for editing.
'***********************************************************
If Not dp Is Nothing Then
EditItem dp
End If
End Sub
Private Function EditItem(dp As CInputField) As Boolean
EditItem = False
If dp Is Nothing Then Exit Function
'fraEditDatapoint.Enabled = True
'txtDatapointName.Text = dp.name
EditItem = True
End Function
Private Function AddItem() As CInputField
On Error GoTo eHandler
Set AddItem = Nothing
Dim dp As CInputField
Dim cp As CInputRecord
Dim i As Integer
'****************************************************
' Get the checkpoint that will own the new data item.
'****************************************************
Set cp = GImport.GetCheckPointByName(cboCheckpoints.Text)
If cp Is Nothing Then Exit Function
'********************************************************
' Create a new datapoint and add it to our import object.
'********************************************************
Set dp = cp.AddDataPoint(True)
If dp Is Nothing Then GoTo exitFunction
'***************************
' Update our datapoint list.
'***************************
Dim newItem As ListItem
Set newItem = lstDataPoints.ListItems.Add(, dp.GetID(), dp.name())
newItem.SubItems(1) = lstDataPoints.ListItems.Count
dp.index = lstDataPoints.ListItems.Count
Set AddItem = dp
exitFunction:
Set cp = Nothing
Set dp = Nothing
Exit Function
eHandler:
MsgBox Error(Err)
End Function
Private Sub btnAddStep_Click()
Dim cp As CInputRecord
Dim di As CInputField
' Get the checkpoint we are working with.
Set cp = GImport.GetCheckPointByName(Me.cboCheckpoints.Text)
Set di = cp.GetDataPoint(Me.lstDataPoints.SelectedItem.key)
' Load the form which will add the new action object.
frmSelectActionType.Initialize _
eCmdApplications.appDataItem, di.name, di.GetActions
frmSelectActionType.Show vbModal
If GFormReturnValue = vbOK Then
ChangeActionList
End If
Set cp = Nothing
Set di = Nothing
End Sub
Private Sub btnClose_Click()
Unload Me
End Sub
Private Sub btnDelete_Click()
Dim cp As CInputRecord
Dim di As CInputField
Dim act As Object
Set cp = GImport.GetCheckPointByName(cboCheckpoints.Text)
Set di = cp.GetDataPointByName(Me.lstDataPoints.SelectedItem.Text)
di.GetActions.Remove Me.lstActions.SelectedItem.index
di.GetActions.Reorder
ChangeActionList
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -