📄 frmthemewizard2_g.frm
字号:
VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "msflxgrd.ocx"
Begin VB.Form frmThemeWizard2_G
BackColor = &H8000000A&
BorderStyle = 3 'Fixed Dialog
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 = "2922"
Begin VB.CommandButton btnCancel
Cancel = -1 'True
Caption = "&Cancel"
Height = 375
Left = 4830
TabIndex = 8
Tag = "3058"
Top = 3465
Width = 1200
End
Begin VB.CommandButton btnBack
Caption = "&Back"
Height = 375
Left = 2055
TabIndex = 7
Tag = "3129"
Top = 3465
Width = 1200
End
Begin VB.CommandButton btnOK
Caption = "&Finish"
Default = -1 'True
Height = 375
Left = 3255
TabIndex = 6
Tag = "3133"
Top = 3465
Width = 1200
End
Begin VB.ComboBox cmbGraphType
Height = 315
Left = 4230
Style = 2 'Dropdown List
TabIndex = 1
Top = 525
Width = 1875
End
Begin MSComDlg.CommonDialog cdlColor
Left = 825
Top = 3330
_ExtentX = 847
_ExtentY = 847
_Version = 393216
End
Begin MSFlexGridLib.MSFlexGrid flxgLegend
Height = 1845
Left = 1935
TabIndex = 2
Top = 1305
Width = 4140
_ExtentX = 7303
_ExtentY = 3254
_Version = 393216
Rows = 3
FixedRows = 0
FixedCols = 0
BackColorBkg = 16777215
AllowBigSelection= 0 'False
GridLines = 2
AllowUserResizing= 1
End
Begin VB.Image Image1
BorderStyle = 1 'Fixed Single
Height = 3090
Left = 150
Picture = "frmThemeWizard2_G.frx":0000
Top = 150
Width = 1695
End
Begin VB.Label Label3
Caption = "Satatistic Map Type"
Height = 225
Left = 4305
TabIndex = 5
Tag = "3252"
Top = 285
Width = 1800
End
Begin VB.Line Line3
BorderColor = &H80000003&
X1 = 0
X2 = 6405
Y1 = 3330
Y2 = 3330
End
Begin VB.Line Line2
BorderColor = &H80000005&
X1 = 15
X2 = 6405
Y1 = 3345
Y2 = 3345
End
Begin VB.Label Label2
Caption = "Legend Color"
Height = 225
Left = 2010
TabIndex = 4
Tag = "3253"
Top = 1050
Width = 1560
End
Begin VB.Line Line1
X1 = 2070
X2 = 3960
Y1 = 690
Y2 = 690
End
Begin VB.Label lblBoundary
BorderStyle = 1 'Fixed Single
Height = 315
Left = 1935
TabIndex = 0
Top = 540
Width = 2130
End
Begin VB.Label Label1
Caption = "Bound Color"
Height = 225
Left = 2010
TabIndex = 3
Tag = "3251"
Top = 285
Width = 1395
End
End
Attribute VB_Name = "frmThemeWizard2_G"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'说 明:用来创建各种统计专题图(向导2)
Option Explicit
Private Sub btnBack_Click()
Unload Me
frmThemeWizard1_G.Show vbModal
End Sub
Private Sub btnCancel_Click()
Unload Me
Unload frmThemeWizard1_G
Unload frmTheme1
End Sub
Private Sub btnOK_Click()
Dim objLayer As soLayer
Dim objThemeGraph As soThemeGraph
Dim i As Integer
Set objLayer = frmMain.SuperMap1.Layers.Item(frmTheme1.cmbLayerName.Text)
If objLayer Is Nothing Then
MsgBox "No Layer", vbInformation
Exit Sub
End If
Set objThemeGraph = objLayer.ThemeGraph
If objThemeGraph Is Nothing Then
MsgBox "No themetic Map", vbInformation
Exit Sub
End If
Select Case cmbGraphType.Text
Case "面积图"
objThemeGraph.GraphType = scpArea
Case "柱状图"
objThemeGraph.GraphType = scpBar
Case "三维柱状图"
objThemeGraph.GraphType = scpBar3D
Case "折线图"
objThemeGraph.GraphType = scpLine
Case "饼图"
objThemeGraph.GraphType = scpPie
Case "三维饼图"
objThemeGraph.GraphType = scpPie3D
Case "散点图"
objThemeGraph.GraphType = scpPoint
Case "玫瑰图"
objThemeGraph.GraphType = scpRose
Case "三维玫瑰图"
objThemeGraph.GraphType = scpRose3D
Case "阶梯图"
objThemeGraph.GraphType = scpStep
End Select
objThemeGraph.FieldCount = frmThemeWizard1_G.lstDestination.ListCount
flxgLegend.Col = 0
For i = 1 To frmThemeWizard1_G.lstDestination.ListCount
frmThemeWizard1_G.lstDestination.ListIndex = i - 1
objThemeGraph.Field(i) = frmThemeWizard1_G.lstDestination.List(i - 1)
flxgLegend.Row = i
objThemeGraph.Color(i) = Me.flxgLegend.CellBackColor
Next i
objThemeGraph.Enable = True
Set objLayer = Nothing
Set objThemeGraph = Nothing
frmMain.SuperMap1.Refresh
' frmmain.SuperLegend1.Refresh
Unload Me
Unload frmThemeWizard1_G
Unload frmTheme1
End Sub
Private Sub cmbGraphType_Click()
Select Case cmbGraphType.Text
Case "面积图"
Case "柱状图"
Case "三维柱状图"
Case "折线图"
Case "饼图"
Case "三维饼图"
Case "散点图"
Case "玫瑰图"
Case "三维玫瑰图"
Case "阶梯图"
End Select
End Sub
Private Sub flxgLegend_DblClick()
If (flxgLegend.Col = 0) And (flxgLegend.Row <> 0) Then
cdlColor.ShowColor
If cdlColor.Color <> 0 Then
flxgLegend.CellBackColor = cdlColor.Color
End If
End If
End Sub
Private Sub Form_Load()
flxgLegend.ColWidth(0) = 500
flxgLegend.ColWidth(1) = flxgLegend.Width - flxgLegend.ColWidth(0)
flxgLegend.ColAlignment(1) = flexAlignLeftCenter
flxgLegend.Rows = frmThemeWizard1_G.lstDestination.ListCount + 1
flxgLegend.Row = 0
flxgLegend.Col = 0
flxgLegend.Text = "颜色"
flxgLegend.CellBackColor = &H80000004
flxgLegend.Col = 1
flxgLegend.Text = "字段"
flxgLegend.CellBackColor = &H80000004
Dim i As Integer
flxgLegend.Col = 1
For i = 0 To frmThemeWizard1_G.lstDestination.ListCount - 1
flxgLegend.Row = i + 1
frmThemeWizard1_G.lstDestination.ListIndex = i
flxgLegend.Text = frmThemeWizard1_G.lstDestination.Text
Next
Randomize
flxgLegend.Col = 0
For i = 1 To flxgLegend.Rows - 1
flxgLegend.Row = i
flxgLegend.CellBackColor = Int(16777216 * Rnd)
Next i
'添加统计图图类型列表
With cmbGraphType
.AddItem "面积图"
.AddItem "柱状图"
.AddItem "三维柱状图"
.AddItem "折线图"
.AddItem "饼图"
.AddItem "三维饼图"
.AddItem "散点图"
.AddItem "玫瑰图"
.AddItem "三维玫瑰图"
.AddItem "阶梯图"
End With
End Sub
Private Sub lblBoundary_DblClick()
cdlColor.ShowColor
If cdlColor.Color <> "0" Then
Line1.BorderColor = cdlColor.Color
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -