Common Custom EditorTask
Common_CustomEditorTask_CSharp\CustomEditorTask_CSharp\CustomEditorSettingsPanel.cs
// 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.
// 

using System;
using System.Collections.Generic;
using System.Text;
using ESRI.ArcGIS.ADF.ArcGISServer.Editor;

namespace CustomEditorTask_CSharp
{
    public class CustomEditorSettingsPanel : EditorSettingsPanel
    {                
        public CustomEditorSettingsPanel(CustomEditorTask task) : base(task) { }

        // Override to create the Editor panels in the Settings panel
        protected override List<EditorPanel> CreateEditorPanels()
        {            
            // Call base.CreateEditorPanels() to get the default panel collection
            // otherwise create a new list (below).
            List<EditorPanel> panels = new List<EditorPanel>();

            // Create the snapping settings panel.  Get a reference to the custom 
            // EditorTask to access custom properties (snap in pixel or map units).
            CustomEditorTask customEditorTask = (CustomEditorTask)this.Task;
            EditorPanel snappingPanel = null;
            if (customEditorTask.UseMapUnitsForSnapping)
            {
                snappingPanel = new CustomSnappingPanel(this.Task);
                // Set to false to hide panel
                snappingPanel.Visible = true;
            }
            else
            {
                snappingPanel = new SnappingPanel(this.Task);
            }
            panels.Add(snappingPanel);

            // Create the selection settings panel (default panel)
            EditorPanel selectionPanel = new SelectionPanel(this.Task);
            panels.Add(selectionPanel);            
            
            // Create the custom polygon to line layer settings panel
            PolygonToLineLayerEditorPanel customPolygonToLinePanel = 
                new PolygonToLineLayerEditorPanel("Polygon to Polyline Settings", this.Task, "P2PPanel");
            panels.Add(customPolygonToLinePanel);

            return panels;
        }              
    }
}