📄 tadrset.frm
字号:
VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Object = "{058ADF50-1120-11D0-80D0-0000F73D691E}#1.0#0"; "MAPENGIN.OCX"
Begin VB.Form TargetDrawSetting
BorderStyle = 1 'Fixed Single
Caption = "显示设置"
ClientHeight = 4065
ClientLeft = 3870
ClientTop = 1680
ClientWidth = 5895
ControlBox = 0 'False
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
PaletteMode = 1 'UseZOrder
ScaleHeight = 4065
ScaleWidth = 5895
Begin VB.Frame frmTargetName
Caption = "车辆名称"
BeginProperty Font
Name = "MS Sans Serif"
Size = 12
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 1455
Left = 3000
TabIndex = 10
Top = 1920
Width = 2655
Begin VB.CommandButton cmdTargetNameColor
Caption = "颜色"
BeginProperty Font
Name = "MS Sans Serif"
Size = 12
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1320
TabIndex = 11
Top = 600
Width = 1095
End
Begin VB.Label lblTargetName
Caption = "例如"
BeginProperty Font
Name = "MS Sans Serif"
Size = 12
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 360
TabIndex = 12
Top = 600
Width = 735
End
End
Begin MSComDlg.CommonDialog oCommonDialog
Left = 120
Top = 3480
_ExtentX = 847
_ExtentY = 847
_Version = 393216
End
Begin VB.Frame frmTargetLocked
Caption = "报警图例"
BeginProperty Font
Name = "MS Sans Serif"
Size = 12
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 1575
Left = 3000
TabIndex = 6
Top = 120
Width = 2655
Begin VB.CommandButton cmdTargetLockedLegend
Caption = "图例"
BeginProperty Font
Name = "MS Sans Serif"
Size = 12
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1320
TabIndex = 14
Top = 480
Width = 1095
End
Begin VB.CommandButton cmdTargetLockedColor
Caption = "颜色"
BeginProperty Font
Name = "MS Sans Serif"
Size = 12
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1320
TabIndex = 9
Top = 960
Width = 1095
End
Begin MapEngineLib.ThmSimple ThmSimpleTargetLocked
Height = 975
Left = 240
TabIndex = 7
Top = 360
Width = 975
_Version = 65536
_ExtentX = 1720
_ExtentY = 1720
_StockProps = 0
End
End
Begin VB.Frame frmTargetTrack
Caption = "轨迹图例"
BeginProperty Font
Name = "MS Sans Serif"
Size = 12
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 1455
Left = 120
TabIndex = 4
Top = 1920
Width = 2655
Begin VB.CommandButton cmdTargetTrackLegend
Caption = "图例"
BeginProperty Font
Name = "MS Sans Serif"
Size = 12
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1320
TabIndex = 8
Top = 600
Width = 1095
End
Begin MapEngineLib.ThmSimple ThmSimpleTargetTrack
Height = 975
Left = 240
TabIndex = 5
Top = 360
Width = 975
_Version = 65536
_ExtentX = 1720
_ExtentY = 1720
_StockProps = 0
End
End
Begin VB.Frame frmTarget
Caption = "车辆图例"
BeginProperty Font
Name = "MS Sans Serif"
Size = 12
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 1575
Left = 120
TabIndex = 1
Top = 120
Width = 2655
Begin VB.CommandButton cmdTargetLegend
Caption = "图例"
BeginProperty Font
Name = "MS Sans Serif"
Size = 12
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1320
TabIndex = 13
Top = 480
Width = 1095
End
Begin VB.CommandButton cmdTargetColor
Caption = "颜色"
BeginProperty Font
Name = "MS Sans Serif"
Size = 12
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1320
TabIndex = 3
Top = 960
Width = 1095
End
Begin MapEngineLib.ThmSimple ThmSimpleTarget
Height = 975
Left = 240
TabIndex = 2
Top = 360
Width = 975
_Version = 65536
_ExtentX = 1720
_ExtentY = 1720
_StockProps = 0
End
End
Begin VB.CommandButton cmdClose
Caption = "关闭"
BeginProperty Font
Name = "MS Sans Serif"
Size = 12
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 2400
TabIndex = 0
Top = 3600
Width = 1095
End
End
Attribute VB_Name = "TargetDrawSetting"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Apply()
If g_oTargetRes.legendOID <> 0 Then
ShowLegend ThmSimpleTarget, g_oTargetRes
End If
lblTargetName.ForeColor = g_lTargetNameColor
If g_oTargetTrackRes.legendOID <> 0 Then
ShowLegend ThmSimpleTargetTrack, g_oTargetTrackRes
End If
If g_oTargetLockedRes.legendOID <> 0 Then
ShowLegend ThmSimpleTargetLocked, g_oTargetLockedRes
End If
End Sub
Private Sub ShowLegend(ByVal oThmSimple As ThmSimple, ByVal oRes As ResMapping)
oThmSimple.BackColor = RGB(192, 192, 192)
oThmSimple.InitSize 1, 1
oThmSimple.originLeft = 5
oThmSimple.originTop = 5
oThmSimple.legendHeight = 50
oThmSimple.legendWidth = 50
Set oThmSimple.Legend(0, 0) = oRes
oThmSimple.Redraw
End Sub
Private Sub cmdClose_Click()
Unload Me
End Sub
Private Sub cmdTargetColor_Click()
oCommonDialog.ShowColor
g_oTargetRes.Color = oCommonDialog.Color
Apply
End Sub
Private Sub cmdTargetLegend_Click()
Dim oRes As ResMapping
Set oRes = MDIMainForm.oSpaDB.SelectLegend(meShapePoint)
oRes.bUseColor = True
oRes.Color = g_oTargetRes.Color
Set g_oTargetRes = oRes
Apply
End Sub
Private Sub cmdTargetLockedColor_Click()
oCommonDialog.ShowColor
g_oTargetLockedRes.Color = oCommonDialog.Color
Apply
End Sub
Private Sub cmdTargetLockedLegend_Click()
Dim oRes As ResMapping
Set oRes = MDIMainForm.oSpaDB.SelectLegend(meShapePoint)
oRes.bUseColor = True
oRes.Color = g_oTargetLockedRes.Color
Set g_oTargetLockedRes = oRes
Apply
End Sub
Private Sub cmdTargetNameColor_Click()
oCommonDialog.ShowColor
g_lTargetNameColor = oCommonDialog.Color
Apply
End Sub
Private Sub cmdTargetTrackLegend_Click()
Dim oRes As ResMapping
Set oRes = MDIMainForm.oSpaDB.SelectLegend(meShapePoint)
oRes.bUseColor = False
oRes.Color = g_oTargetTrackRes.Color
Set g_oTargetTrackRes = oRes
Apply
End Sub
Private Sub Form_Load()
If Not ThmSimpleTarget.ConnectSpaDB(MDIMainForm.oSpaDB.GetHandle) Then
MsgBox "异常错误,图库连接失败!"
Unload Me
End If
If Not ThmSimpleTargetLocked.ConnectSpaDB(MDIMainForm.oSpaDB.GetHandle) Then
MsgBox "异常错误,图库连接失败!"
Unload Me
End If
If Not ThmSimpleTargetTrack.ConnectSpaDB(MDIMainForm.oSpaDB.GetHandle) Then
MsgBox "异常错误,图库连接失败!"
Unload Me
End If
Apply
End Sub
Private Sub Form_Unload(Cancel As Integer)
Dim strName As String
Dim oLegend As Legend
Set oLegend = MDIMainForm.oSpaDB.Legends(0)
If oLegend.Load(g_oTargetRes.legendOID) Then
strName = oLegend.Name
Ini_SaveTargetLegend strName
End If
If oLegend.Load(g_oTargetLockedRes.legendOID) Then
strName = oLegend.Name
Ini_SaveTargetLockedLegend strName
End If
If oLegend.Load(g_oTargetTrackRes.legendOID) Then
strName = oLegend.Name
Ini_SaveTargetTrackLegend strName
End If
Ini_SaveTargetLegendColor g_oTargetRes.Color
Ini_SaveTargetLockedLegendColor g_oTargetLockedRes.Color
Ini_SaveTargetTrackLegendColor g_oTargetTrackRes.Color
Ini_SaveTargetNameColor g_lTargetNameColor
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -