SpatialQuerySOE.ArcCatalog_VBNet\SOEPropertyPage.vb
' Copyright 2010 ESRI ' ' All rights reserved under the copyright laws of the United States ' and applicable international laws, treaties, and conventions. ' ' You may freely redistribute and use this sample code, with or ' without modification, provided you include the original copyright ' notice and use restrictions. ' ' See the use restrictions. ' Imports Microsoft.VisualBasic Imports System Imports System.Collections.Generic Imports System.Text Namespace SOEUtilities ''' <summary> ''' Class to simplify implementation of a custom SOE property page for ArcCatalog. Abstracts away COM registration and members that ''' are unnecessary in a custom property page implemenation. ''' </summary> <System.Runtime.InteropServices.Guid("B1F2FD28-04AB-4653-8C5F-7C65B355AC1D")> _ Public MustInherit Class SOEPropertyPage Implements ESRI.ArcGIS.Framework.IComPropertyPage, ESRI.ArcGIS.CatalogUI.IAGSSOEParameterPage #Region "Component Category Registration" <System.Runtime.InteropServices.ComRegisterFunction(), System.Runtime.InteropServices.ComVisible(False)> _ Private Shared Sub RegisterFunction(ByVal registerType As Type) Dim regKey As String = String.Format("HKEY_CLASSES_ROOT\CLSID\{{{0}}}", registerType.GUID) ESRI.ArcGIS.ADF.CATIDs.AGSSOEParameterPages.Register(regKey) End Sub <System.Runtime.InteropServices.ComUnregisterFunction(), System.Runtime.InteropServices.ComVisible(False)> _ Private Shared Sub UnregisterFunction(ByVal registerType As Type) Dim regKey As String = String.Format("HKEY_CLASSES_ROOT\CLSID\{{{0}}}", registerType.GUID) ESRI.ArcGIS.ADF.CATIDs.AGSSOEParameterPages.Unregister(regKey) End Sub #End Region #Region "IComPropertyPage Members" #Region "Abstract (Must Implement) Members - PageSite, Activate, Show, Hide" Public MustOverride WriteOnly Property PageSite() As ESRI.ArcGIS.Framework.IComPropertyPageSite Implements ESRI.ArcGIS.Framework.IComPropertyPage.PageSite Public MustOverride Function Activate() As Integer Implements ESRI.ArcGIS.Framework.IComPropertyPage.Activate Public MustOverride Sub Show() Implements ESRI.ArcGIS.Framework.IComPropertyPage.Show Public MustOverride Sub Hide() Implements ESRI.ArcGIS.Framework.IComPropertyPage.Hide #End Region #Region "Virtual (Overrideable) Methods - Height, Deactivate" Public Overridable ReadOnly Property Height() As Integer Implements ESRI.ArcGIS.Framework.IComPropertyPage.Height Get Return 0 End Get End Property Public Overridable Sub Deactivate() Implements ESRI.ArcGIS.Framework.IComPropertyPage.Deactivate End Sub #End Region #Region "Non-Overridable Members - Not Invoked by ArcCatalog" Public ReadOnly Property IsPageDirty() As Boolean Implements ESRI.ArcGIS.Framework.IComPropertyPage.IsPageDirty Get Return False End Get End Property Public Property Title() As String Implements ESRI.ArcGIS.Framework.IComPropertyPage.Title Get Return Nothing End Get Set(ByVal value As String) End Set End Property Public Property Priority() As Integer Implements ESRI.ArcGIS.Framework.IComPropertyPage.Priority Get Return 0 End Get Set(ByVal value As Integer) End Set End Property Public ReadOnly Property HelpFile() As String Implements ESRI.ArcGIS.Framework.IComPropertyPage.HelpFile Get Return Nothing End Get End Property Public ReadOnly Property Width() As Integer Implements ESRI.ArcGIS.Framework.IComPropertyPage.Width Get Return 0 End Get End Property Public Sub Apply() Implements ESRI.ArcGIS.Framework.IComPropertyPage.Apply End Sub Public Sub Cancel() Implements ESRI.ArcGIS.Framework.IComPropertyPage.Cancel End Sub Public ReadOnly Property HelpContextID(ByVal controlID As Integer) As Integer Implements ESRI.ArcGIS.Framework.IComPropertyPage.HelpContextID Get Return 0 End Get End Property 'Public Function get_HelpContextID(ByVal controlID As Integer) As Integer Implements ESRI.ArcGIS.Framework.IComPropertyPage ' Return 0 'End Function Public Sub SetObjects(ByVal objects As ESRI.ArcGIS.esriSystem.ISet) Implements ESRI.ArcGIS.Framework.IComPropertyPage.SetObjects End Sub Public Function Applies(ByVal objects As ESRI.ArcGIS.esriSystem.ISet) As Boolean Implements ESRI.ArcGIS.Framework.IComPropertyPage.Applies Return False End Function #End Region #End Region #Region "IAGSSOEParameterPage Members - All must be implemented" Public MustOverride Property ServerObjectProperties() As ESRI.ArcGIS.esriSystem.IPropertySet Implements ESRI.ArcGIS.CatalogUI.IAGSSOEParameterPage.ServerObjectProperties Public MustOverride Property ExtensionProperties() As ESRI.ArcGIS.esriSystem.IPropertySet Implements ESRI.ArcGIS.CatalogUI.IAGSSOEParameterPage.ExtensionProperties Public MustOverride ReadOnly Property ServerObjectExtensionType() As String Implements ESRI.ArcGIS.CatalogUI.IAGSSOEParameterPage.ServerObjectExtensionType Public MustOverride ReadOnly Property ServerObjectType() As String Implements ESRI.ArcGIS.CatalogUI.IAGSSOEParameterPage.ServerObjectType #End Region End Class End Namespace