📄 frmthemewizard1_g.frm
字号:
VERSION 5.00
Begin VB.Form frmThemeWizard1_G
BorderStyle = 3 'Fixed Dialog
Caption = "专题图向导一"
ClientHeight = 3885
ClientLeft = 45
ClientTop = 330
ClientWidth = 6315
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3885
ScaleWidth = 6315
ShowInTaskbar = 0 'False
StartUpPosition = 2 'CenterScreen
Tag = "2920"
Begin VB.CommandButton btnNext
Caption = "下一步(&N)"
Default = -1 'True
Height = 375
Left = 3255
TabIndex = 11
Tag = "3130"
Top = 3465
Width = 1200
End
Begin VB.CommandButton btnBack
Caption = "上一步(&B)"
Height = 375
Left = 2055
TabIndex = 10
Tag = "3129"
Top = 3465
Width = 1200
End
Begin VB.CommandButton btnCancel
Cancel = -1 'True
Caption = "放弃(&C)"
Height = 375
Left = 4830
TabIndex = 9
Tag = "3058"
Top = 3465
Width = 1200
End
Begin VB.CommandButton btnDelAll
Caption = "<--"
Enabled = 0 'False
Height = 330
Left = 3780
TabIndex = 4
Top = 2640
Width = 540
End
Begin VB.CommandButton btnAddAll
Caption = "++>"
Height = 330
Left = 3780
TabIndex = 3
Top = 2205
Width = 540
End
Begin VB.CommandButton btnDel
Caption = "<-"
Enabled = 0 'False
Height = 330
Left = 3780
TabIndex = 2
Top = 1770
Width = 540
End
Begin VB.CommandButton btnAdd
Caption = "+>"
Height = 330
Left = 3780
TabIndex = 1
Top = 1335
Width = 540
End
Begin VB.ListBox lstSource
Height = 1620
Left = 1920
TabIndex = 0
Top = 1155
Width = 1800
End
Begin VB.ListBox lstDestination
Height = 1620
Left = 4350
TabIndex = 5
Top = 1140
Width = 1800
End
Begin VB.Image Image1
BorderStyle = 1 'Fixed Single
Height = 3090
Left = 150
Picture = "frmThemeWizard1_G.frx":0000
Top = 150
Width = 1695
End
Begin VB.Line Line1
BorderColor = &H80000005&
X1 = 0
X2 = 6405
Y1 = 3345
Y2 = 3345
End
Begin VB.Line Line2
BorderColor = &H80000003&
X1 = 15
X2 = 6405
Y1 = 3330
Y2 = 3330
End
Begin VB.Label Label3
Caption = "已选字段"
Height = 240
Left = 4350
TabIndex = 8
Tag = "3243"
Top = 810
Width = 1830
End
Begin VB.Label Label2
Caption = "可选字段"
Height = 240
Left = 1935
TabIndex = 7
Tag = "3242"
Top = 840
Width = 1890
End
Begin VB.Label Label1
Caption = "请选择用于制作统计图的字段"
Height = 390
Left = 1935
TabIndex = 6
Tag = "3241"
Top = 195
Width = 2595
End
End
Attribute VB_Name = "frmThemeWizard1_G"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'说 明:用来创建各种统计专题图(向导1)
Private Sub btnAdd_Click()
If lstSource.ListCount < 1 Then Exit Sub
If lstSource.ListIndex < 0 Then Exit Sub
lstDestination.AddItem lstSource.Text
lstSource.RemoveItem lstSource.ListIndex
lstDestination.ListIndex = 0
If lstSource.ListCount = 0 Then
btnAdd.Enabled = False
btnAddAll.Enabled = False
End If
btnNext.Enabled = True
btnDel.Enabled = True
btnDelAll.Enabled = True
End Sub
Private Sub btnAddAll_Click()
lstDestination.Clear
Dim i As Integer, iLstCount As Integer
iLstCount = lstSource.ListCount
For i = 0 To iLstCount - 1
lstSource.ListIndex = 0
lstDestination.AddItem lstSource.Text
lstSource.RemoveItem lstSource.ListIndex
Next
lstDestination.ListIndex = 0
btnDel.Enabled = True
btnDelAll.Enabled = True
btnNext.Enabled = True
btnAdd.Enabled = False
btnAddAll.Enabled = False
End Sub
Private Sub btnBack_Click()
Unload Me
frmTheme1.Show vbModal
End Sub
Private Sub btnCancel_Click()
Unload Me
End Sub
Private Sub btnDel_Click()
If lstDestination.ListIndex < 0 Then Exit Sub
lstSource.AddItem lstDestination.Text
lstDestination.RemoveItem lstDestination.ListIndex
lstSource.ListIndex = 0
If lstDestination.ListCount = 0 Then
btnDelAll.Enabled = False
btnDel.Enabled = False
End If
btnAdd.Enabled = True
btnAddAll.Enabled = True
End Sub
Private Sub btnDelAll_Click()
Dim i As Integer, iLstCount As Integer
iLstCount = lstDestination.ListCount
lstSource.Clear
For i = 0 To iLstCount - 1
lstDestination.ListIndex = 0
lstSource.AddItem lstDestination.Text
lstDestination.RemoveItem lstDestination.ListIndex
Next
lstSource.ListIndex = 0
btnNext.Enabled = False
btnDelAll.Enabled = False
btnDel.Enabled = False
btnAdd.Enabled = True
btnAddAll.Enabled = True
End Sub
Private Sub btnNext_Click()
Me.Hide
frmThemeWizard2_G.Show vbModal
End Sub
Private Sub Form_Load()
'添加供选字段列表
Dim DS As soDataSource
Dim DtVector As soDatasetVector
Dim RecordSet As soRecordset
Dim FieldInfo As soFieldInfo
Dim strName As String
strName = Mid$(frmTheme1.cmbLayerName.Text, InStr(frmTheme1.cmbLayerName.Text, "@") + 1)
Set DS = frmMain.SuperWorkspace1.Datasources.Item(strName)
If DS Is Nothing Then
MsgBox "错误!", vbInformation
Exit Sub
End If
strName = frmMain.SuperMap1.Layers.Item(frmTheme1.cmbLayerName.Text).Dataset.Name
Set DtVector = DS.Datasets.Item(strName)
If DtVector Is Nothing Then
Set DS = Nothing
MsgBox "错误!", vbInformation
Exit Sub
End If
DtVector.Open
Set RecordSet = DtVector.Query("", True)
If RecordSet Is Nothing Then
MsgBox "错误!", vbInformation
Exit Sub
End If
Dim i As Integer
For i = 1 To RecordSet.FieldCount
Set FieldInfo = RecordSet.GetFieldInfo(i)
If FieldInfo Is Nothing Then
MsgBox "错误!", vbInformation
Exit Sub
End If
Select Case FieldInfo.Type
Case scfInteger, scfDouble, scfLong, scfSingle
lstSource.AddItem FieldInfo.Name
End Select
Next
lstSource.ListIndex = 0
Set DS = Nothing
Set DtVector = Nothing
Set RecordSet = Nothing
Set FieldInfo = Nothing
End Sub
Private Sub lstDestination_DblClick()
btnDel_Click
End Sub
Private Sub lstSource_DblClick()
btnAdd_Click
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -