WizardStepCollectionEditor.cs source code in C# .NET

Source code for the .NET framework in C#

                        

Code:

/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / Designer / WebForms / System / Web / UI / Design / WebControls / WizardStepCollectionEditor.cs / 1 / WizardStepCollectionEditor.cs

                            //------------------------------------------------------------------------------ 
// 
//     Copyright (c) Microsoft Corporation.  All rights reserved.
// 
//----------------------------------------------------------------------------- 

namespace System.Web.UI.Design.WebControls { 
 
    using System;
    using System.Collections; 
    using System.Design;
    using System.Reflection;
    using System.ComponentModel;
    using System.ComponentModel.Design; 
    using System.Web.UI.WebControls;
 
    ///  
    /// 
    ///    Provides an editor to edit wizardsteps in a Wizard. 
    /// 
    [System.Security.Permissions.SecurityPermission(System.Security.Permissions.SecurityAction.Demand, Flags=System.Security.Permissions.SecurityPermissionFlag.UnmanagedCode)]
    public class WizardStepCollectionEditor : CollectionEditor {
 
        /// 
        ///  
        /// Initializes a new instance of the  class. 
        /// 
        public WizardStepCollectionEditor(Type type) : base(type) { 
        }

        /// 
        ///  
        ///    Gets a value indicating whether multiple instances may be selected.
        ///  
        protected override bool CanSelectMultipleInstances() { 
            return false;
        } 

        protected override CollectionForm CreateCollectionForm() {
            CollectionForm form = base.CreateCollectionForm();
            form.Text = SR.GetString(SR.CollectionEditorCaption, "WizardStep"); 

            return form; 
        } 

        ///  
        /// 
        ///    [To be supplied.]
        /// 
        protected override object CreateInstance(Type itemType) { 
            return Activator.CreateInstance(itemType, BindingFlags.Instance | BindingFlags.Public | BindingFlags.CreateInstance, null, null, null);
        } 
 
        /// 
        ///  
        ///      Retrieves the data types this collection can contain.  The default
        ///      implementation looks inside of the collection for the Item property
        ///      and returns the returning datatype of the item.  Do not call this
        ///      method directly.  Instead, use the ItemTypes property.  Use this 
        ///      method to override the default implementation.
        ///  
        protected override Type[] CreateNewItemTypes() { 
            return new Type[] {
                typeof(WizardStep), 
                typeof(TemplatedWizardStep)
            };
        }
    } 
}

// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
                        

Link Menu

Network programming in C#, Network Programming in VB.NET, Network Programming in .NET
This book is available now!
Buy at Amazon US or
Buy at Amazon UK