Ejemplo n.º 1
0
        protected ToolZone(WebPartDisplayMode associatedDisplayMode) {
            if (associatedDisplayMode == null) {
                throw new ArgumentNullException("associatedDisplayMode");
            }

            _associatedDisplayModes = new WebPartDisplayModeCollection();
            _associatedDisplayModes.Add(associatedDisplayMode);
            _associatedDisplayModes.SetReadOnly(SR.ToolZone_DisplayModesReadOnly);
        }
Ejemplo n.º 2
0
        protected ToolZone(WebPartDisplayMode associatedDisplayMode)
        {
            if (associatedDisplayMode == null)
            {
                throw new ArgumentNullException("associatedDisplayMode");
            }

            _associatedDisplayModes = new WebPartDisplayModeCollection();
            _associatedDisplayModes.Add(associatedDisplayMode);
            _associatedDisplayModes.SetReadOnly(SR.ToolZone_DisplayModesReadOnly);
        }
Ejemplo n.º 3
0
        protected ToolZone(ICollection associatedDisplayModes) {
            if ((associatedDisplayModes == null) || (associatedDisplayModes.Count == 0)) {
                throw new ArgumentNullException("associatedDisplayModes");
            }

            _associatedDisplayModes = new WebPartDisplayModeCollection();
            foreach (WebPartDisplayMode mode in associatedDisplayModes) {
                _associatedDisplayModes.Add(mode);
            }
            _associatedDisplayModes.SetReadOnly(SR.ToolZone_DisplayModesReadOnly);
        }
Ejemplo n.º 4
0
        protected ToolZone(ICollection associatedDisplayModes)
        {
            if ((associatedDisplayModes == null) || (associatedDisplayModes.Count == 0))
            {
                throw new ArgumentNullException("associatedDisplayModes");
            }

            _associatedDisplayModes = new WebPartDisplayModeCollection();
            foreach (WebPartDisplayMode mode in associatedDisplayModes)
            {
                _associatedDisplayModes.Add(mode);
            }
            _associatedDisplayModes.SetReadOnly(SR.ToolZone_DisplayModesReadOnly);
        }
 protected virtual WebPartDisplayModeCollection CreateDisplayModes()
 {
     WebPartDisplayModeCollection modes = new WebPartDisplayModeCollection();
     modes.Add(BrowseDisplayMode);
     modes.Add(CatalogDisplayMode);
     modes.Add(DesignDisplayMode);
     modes.Add(EditDisplayMode);
     modes.Add(ConnectDisplayMode);
     return modes;
 }