📄 frmhdroflowdirect.frm
字号:
VERSION 5.00
Begin VB.Form frmHdroFlowDirect
BorderStyle = 3 'Fixed Dialog
Caption = "流向分析"
ClientHeight = 3525
ClientLeft = 45
ClientTop = 330
ClientWidth = 4905
ControlBox = 0 'False
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3525
ScaleWidth = 4905
ShowInTaskbar = 0 'False
StartUpPosition = 1 'CenterOwner
Begin VB.CommandButton cmdCancel
Caption = "取消"
Height = 435
Left = 3720
TabIndex = 13
Top = 2925
Width = 945
End
Begin VB.CommandButton cmdOk
Caption = "确定"
Height = 435
Left = 2610
TabIndex = 12
Top = 2925
Width = 945
End
Begin VB.CheckBox ckDrop
Caption = "CreatDrop数据"
Height = 300
Left = 3435
TabIndex = 11
Top = 2445
Width = 1395
End
Begin VB.CheckBox ckDirect
Caption = "边界水流处理"
Height = 375
Left = 1695
TabIndex = 10
Top = 2415
Width = 1410
End
Begin VB.Frame Frame4
Caption = "结果数据集保存"
Height = 1140
Left = 1500
TabIndex = 5
Top = 1200
Width = 3390
Begin VB.TextBox txtDataset
Height = 315
Left = 1095
TabIndex = 7
Text = "Raster"
Top = 660
Width = 2070
End
Begin VB.ComboBox cmbDsListResult
Height = 315
Left = 1095
Style = 2 'Dropdown List
TabIndex = 6
Top = 285
Width = 2070
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "数据集:"
Height = 195
Index = 7
Left = 340
TabIndex = 9
Top = 705
Width = 720
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "数据源:"
Height = 195
Index = 6
Left = 340
TabIndex = 8
Top = 330
Width = 720
End
End
Begin VB.Frame Frame1
Caption = "参加分析的数据"
Height = 1170
Left = 1500
TabIndex = 0
Top = 0
Width = 3390
Begin VB.ComboBox cmbDtList
Height = 315
Left = 1095
Style = 2 'Dropdown List
TabIndex = 2
Top = 705
Width = 2100
End
Begin VB.ComboBox cmbDsList
Height = 315
Left = 1095
Style = 2 'Dropdown List
TabIndex = 1
Top = 255
Width = 2100
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "数据集:"
Height = 195
Index = 1
Left = 340
TabIndex = 4
Top = 705
Width = 720
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "数据源:"
Height = 195
Index = 0
Left = 340
TabIndex = 3
Top = 330
Width = 720
End
End
Begin VB.Image Image1
Appearance = 0 'Flat
BorderStyle = 1 'Fixed Single
Height = 3510
Left = 30
Picture = "frmHdroFlowDirect.frx":0000
Stretch = -1 'True
Top = 15
Width = 1455
End
End
Attribute VB_Name = "frmHdroFlowDirect"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub cmbDsList_Click()
If cmbDsList.Text = "" Then Exit Sub
If frmMain.bActiveFrm Then
ChangeDs cmbDsList.Text, cmbDtList
End If
End Sub
Private Sub cmdCancel_Click()
Unload Me
End Sub
Private Sub cmdOk_Click()
Dim objDs As soDataSource
Dim objDtRst As soDatasetRaster
Dim objSurfaceAnalyst As soSurfaceAnalyst
Dim objHdroOperator As soHydrologyOperator
Dim strTmp As String
Dim bDrop As Boolean
Set objDs = frmMain.SuperWorkspace.Datasources(cmbDsList.Text)
Set objDtRst = objDs.Datasets(cmbDtList.Text)
Set objDs = frmMain.SuperWorkspace.Datasources(cmbDsListResult.Text)
strTmp = DataSetName(objDs, txtDataset.Text)
If strTmp <> "" Then
Set objSurfaceAnalyst = frmMain.SuperAnalyst.SurfaceAnalyst
Set objHdroOperator = objSurfaceAnalyst.Hydrology
If ckDrop.Value = 1 Then
bDrop = True
Else
bDrop = False
End If
Set objDtRst = objHdroOperator.FlowDirection(objDtRst, True, False, , objDs, strTmp)
If Not objDtRst Is Nothing Then
frmMain.SuperWkspManager.Refresh
Else
MsgBox "流向分析失败", vbInformation, "信息提示"
End If
Set objDtRst = Nothing
Set objDs = Nothing
Set objSurfaceAnalyst = Nothing
Set objHdroOperator = Nothing
Unload Me
Else
txtDataset.Text = ""
txtDataset.SetFocus
End If
Set objDtRst = Nothing
Set objDs = Nothing
Set objSurfaceAnalyst = Nothing
Set objHdroOperator = Nothing
End Sub
Private Sub Form_Activate()
frmMain.bActiveFrm = True
cmbDsList_Click
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -