Common Custom EditorTask
Common_CustomEditorTask_VBNet\CustomEditorTask_VBNet\CustomEditorSettingsPanel.vb
' Copyright 2007 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
Imports ESRI.ArcGIS.ADF.ArcGISServer.Editor

Namespace CustomEditorTask_VBNet
  Public Class CustomEditorSettingsPanel
    Inherits EditorSettingsPanel
    Public Sub New(ByVal task As CustomEditorTask)
      MyBase.New(task)
    End Sub

    ' Override to create the Editor panels in the Settings panel
    Protected Overrides Function CreateEditorPanels() As List(Of EditorPanel)
      ' Call base.CreateEditorPanels() to get the default panel collection
      ' otherwise create a new list (below).
      Dim panels As List(Of EditorPanel) = New List(Of EditorPanel)()

      ' Create the snapping settings panel.  Get a reference to the custom 
      ' EditorTask to access custom properties (snap in pixel or map units).
      Dim customEditorTask As CustomEditorTask = CType(Me.Task, CustomEditorTask)
      Dim snappingPanel As EditorPanel = Nothing
      If customEditorTask.UseMapUnitsForSnapping Then
        snappingPanel = New CustomSnappingPanel(Me.Task)
        ' Set to false to hide panel
        snappingPanel.Visible = True
      Else
        snappingPanel = New SnappingPanel(Me.Task)
      End If
      panels.Add(snappingPanel)

      ' Create the selection settings panel (default panel)
      Dim selectionPanel As EditorPanel = New SelectionPanel(Me.Task)
      panels.Add(selectionPanel)

      ' Create the custom polygon to line layer settings panel
            Dim customPolygonToLinePanel As PolygonToLineLayerEditorPanel = New PolygonToLineLayerEditorPanel("Polygon to Polyline Settings", Me.Task, "P2PPanel")
            panels.Add(customPolygonToLinePanel)

      Return panels
    End Function
  End Class
End Namespace