📄 adddataset.frm
字号:
VERSION 5.00
Begin VB.Form AddDataset
BorderStyle = 3 'Fixed Dialog
Caption = "Add dataset"
ClientHeight = 6075
ClientLeft = 2400
ClientTop = 2085
ClientWidth = 5325
Icon = "AddDataset.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
PaletteMode = 1 'UseZOrder
ScaleHeight = 6075
ScaleWidth = 5325
ShowInTaskbar = 0 'False
Begin VB.TextBox txtFieldName
Enabled = 0 'False
Height = 315
Left = 3420
TabIndex = 17
Top = 4560
Width = 1695
End
Begin VB.ComboBox cmbAggregation
Enabled = 0 'False
Height = 315
ItemData = "AddDataset.frx":000C
Left = 1080
List = "AddDataset.frx":001C
Style = 2 'Dropdown List
TabIndex = 15
Top = 4560
Width = 1155
End
Begin VB.CommandButton cmdRemoveFields
Caption = "<--"
Enabled = 0 'False
Height = 315
Left = 2340
TabIndex = 11
Top = 3480
Width = 555
End
Begin VB.CommandButton cmdAddFields
Caption = "-->"
Enabled = 0 'False
Height = 315
Left = 2340
TabIndex = 10
Top = 3000
Width = 555
End
Begin VB.ListBox lstDestFields
Height = 1815
Left = 3000
MultiSelect = 2 'Extended
TabIndex = 13
Top = 2580
Width = 2115
End
Begin VB.ListBox lstSrcFields
Height = 1815
Left = 120
MultiSelect = 2 'Extended
TabIndex = 9
Top = 2580
Width = 2115
End
Begin VB.ComboBox cmbRefineField
Height = 315
ItemData = "AddDataset.frx":003C
Left = 1620
List = "AddDataset.frx":003E
Style = 2 'Dropdown List
TabIndex = 7
Top = 1680
Width = 3495
End
Begin VB.ComboBox cmbGeoField
Height = 315
ItemData = "AddDataset.frx":0040
Left = 1620
List = "AddDataset.frx":0042
Style = 2 'Dropdown List
TabIndex = 5
Top = 1200
Width = 3495
End
Begin VB.ComboBox cmbLayer
Height = 315
ItemData = "AddDataset.frx":0044
Left = 1380
List = "AddDataset.frx":0046
Style = 2 'Dropdown List
TabIndex = 3
Top = 660
Width = 3735
End
Begin VB.ComboBox cmbSource
Height = 315
ItemData = "AddDataset.frx":0048
Left = 1380
List = "AddDataset.frx":004A
Style = 2 'Dropdown List
TabIndex = 1
Top = 180
Width = 3735
End
Begin VB.CommandButton cmdCancel
Cancel = -1 'True
Caption = "&Cancel"
Height = 375
Left = 2760
TabIndex = 20
Top = 5580
Width = 1215
End
Begin VB.CommandButton cmdAdd
Caption = "&Add"
Default = -1 'True
Height = 375
Left = 1380
TabIndex = 21
Top = 5580
Width = 1215
End
Begin VB.TextBox txtName
Height = 315
Left = 1380
TabIndex = 19
Top = 5040
Width = 3735
End
Begin VB.Label lblFieldName
Caption = "Fie&ld name:"
Height = 255
Left = 2460
TabIndex = 16
Top = 4620
Width = 915
End
Begin VB.Label lblAggregation
Caption = "A&ggregation:"
Height = 255
Left = 120
TabIndex = 14
Top = 4620
Width = 975
End
Begin VB.Label lblDestFields
Caption = "Fields in &dataset:"
Height = 255
Left = 3060
TabIndex = 12
Top = 2280
Width = 1335
End
Begin VB.Label lblSrcFields
Caption = "Source &fields:"
Height = 255
Left = 180
TabIndex = 8
Top = 2280
Width = 1095
End
Begin VB.Label lblRefineField
Caption = "&Refining Field:"
Height = 255
Left = 120
TabIndex = 6
Top = 1740
Width = 1335
End
Begin VB.Label lblGeoField
Caption = "&Geographic Field:"
Height = 255
Left = 120
TabIndex = 4
Top = 1260
Width = 1335
End
Begin VB.Label lblLayer
Caption = "&Bind to layer:"
Height = 255
Left = 120
TabIndex = 2
Top = 720
Width = 1155
End
Begin VB.Label lblSource
Caption = "Data &source:"
Height = 255
Left = 120
TabIndex = 0
Top = 240
Width = 1095
End
Begin VB.Label lblDataset
Caption = "Dataset &name:"
Height = 255
Left = 120
TabIndex = 18
Top = 5100
Width = 1155
End
End
Attribute VB_Name = "AddDataset"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
' This sample application and corresponding sample code is provided
' for example purposes only. It has not undergone rigorous testing
' and as such should not be shipped as part of a final application
' without extensive testing on the part of the organization releasing
' the end-user product.
Dim DataFields As MapXLib.Fields, rmFields As MapXLib.Fields
Dim gMap As Map, gRecSrc() As Variant, iSrcCount As Integer, iPrevSrc As Integer
Dim bWasFirstField As Boolean, sPrevName As String, iPrevInd As Integer, bTextOff As Boolean
Dim iPrevAggr As Integer, DataSrcs() As Integer
Public Sub Activate(DataSrc() As Variant, MapXMap As Map)
Dim i As Integer
iSrcCount = UBound(DataSrc)
Set gMap = MapXMap
ReDim gRecSrc(iSrcCount)
For i = 1 To iSrcCount
Set gRecSrc(i) = DataSrc(i)
Next
InitDataSources
InitLayers
InitGeoFields 1
InitDataFields 1
txtName.Text = cmbSource.Text
bWasFirstField = False
bTextOff = False
lstSrcFields.Clear
Set rmFields = New MapXLib.Fields
lstDestFields_Click
FormToCenter AddDataset.hWnd
AddDataset.Show 1
End Sub
Private Sub InitDataSources()
Dim i As Integer
cmbSource.Clear
For i = 1 To iSrcCount
cmbSource.AddItem gRecSrc(i).Name
Next
cmbSource.ListIndex = 0
iPrevSrc = 1
End Sub
Private Sub InitLayers()
Dim i As Integer
cmbLayer.Clear
cmbLayer.AddItem "<AutoDetect>"
For i = 1 To gMap.Layers.Count
cmbLayer.AddItem gMap.Layers(i).Name
Next
cmbLayer.ListIndex = 0
End Sub
Private Sub InitGeoFields(ByVal iSrcNum As Integer)
Dim i As Integer, sName As String
cmbGeoField.Clear
cmbGeoField.AddItem "<AutoDetect>"
cmbRefineField.Clear
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -