📄 regressorui.cls
字号:
VERSION 1.0 CLASS
BEGIN
MultiUse = -1 'True
Persistable = 0 'NotPersistable
DataBindingBehavior = 0 'vbNone
DataSourceBehavior = 0 'vbNone
MTSTransactionMode = 0 'NotAnMTSObject
END
Attribute VB_Name = "RegressTestUI"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = True
' Copyright 1995-2005 ESRI
' All rights reserved under the copyright laws of the United States.
' You may freely redistribute and use this sample code, with or without modification.
' Disclaimer: THE SAMPLE CODE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
' WARRANTIES, INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
' FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ESRI OR
' CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
' OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
' SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
' INTERRUPTION) SUSTAINED BY YOU OR A THIRD PARTY, HOWEVER CAUSED AND ON ANY
' THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ARISING IN ANY
' WAY OUT OF THE USE OF THIS SAMPLE CODE, EVEN IF ADVISED OF THE POSSIBILITY OF
' SUCH DAMAGE.
' For additional information contact: Environmental Systems Research Institute, Inc.
' Attn: Contracts Dept.
' 380 New York Street
' Redlands, California, U.S.A. 92373
' Email: contracts@esri.com
'This class wraps the regression tool for use in the context menu of
'a feature layer.
Option Explicit
Implements ICommand
Private m_pApp As IApplication
Private m_pMXDoc As IMxDocument
Private m_pFeatLayer As IFeatureLayer
Private m_pForm As frmCalculateCorrelation
Private Property Get ICommand_Bitmap() As esriSystem.OLE_HANDLE
End Property
Private Property Get ICommand_Caption() As String
ICommand_Caption = "Correlation"
End Property
Private Property Get ICommand_Category() As String
ICommand_Category = "Analysis Samples"
End Property
Private Property Get ICommand_Checked() As Boolean
End Property
Private Property Get ICommand_Enabled() As Boolean
Dim pUnKnown As IUnknown
' enable if command is in a feature layer context menu
ICommand_Enabled = False
Set pUnKnown = m_pMXDoc.ContextItem
If TypeOf pUnKnown Is IFeatureLayer Then
Set m_pFeatLayer = pUnKnown
ICommand_Enabled = True
End If
End Property
Private Property Get ICommand_HelpContextID() As Long
End Property
Private Property Get ICommand_HelpFile() As String
End Property
Private Property Get ICommand_Message() As String
ICommand_Message = "Performs correlation between two numeric fields"
End Property
Private Property Get ICommand_Name() As String
ICommand_Name = "ESDA_Correlation"
End Property
Private Sub ICommand_OnClick()
Set m_pForm.SourceLayer = m_pFeatLayer
Set m_pForm.MxDocument = m_pMXDoc
m_pForm.Show vbModal
End Sub
Private Sub ICommand_OnCreate(ByVal hook As Object)
Set m_pApp = hook
Set m_pMXDoc = m_pApp.Document
Set m_pForm = New frmCalculateCorrelation
End Sub
Private Property Get ICommand_Tooltip() As String
ICommand_Tooltip = "Calculates correlation between two fields"
End Property
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -