Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / ndp / fx / src / xsp / System / Web / UI / WebParts / CatalogPart.cs / 1 / CatalogPart.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI.WebControls.WebParts { using System; using System.Collections; using System.Collections.Specialized; using System.ComponentModel; using System.Diagnostics; using System.Globalization; using System.Security.Permissions; using System.Web.UI; ////// Provides default rendering and part selection UI /// [ Bindable(false), Designer("System.Web.UI.Design.WebControls.WebParts.CatalogPartDesigner, " + AssemblyRef.SystemDesign), ] [AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)] [AspNetHostingPermission(SecurityAction.InheritanceDemand, Level=AspNetHostingPermissionLevel.Minimal)] public abstract class CatalogPart : Part { private WebPartManager _webPartManager; private CatalogZoneBase _zone; [ Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden) ] public string DisplayTitle { get { string displayTitle = Title; if (String.IsNullOrEmpty(displayTitle)) { displayTitle = SR.GetString(SR.Part_Untitled); } return displayTitle; } } protected WebPartManager WebPartManager { get { return _webPartManager; } } protected CatalogZoneBase Zone { get { return _zone; } } public abstract WebPartDescriptionCollection GetAvailableWebPartDescriptions(); [SecurityPermission(SecurityAction.Demand, Unrestricted = true)] protected override IDictionary GetDesignModeState() { IDictionary state = new HybridDictionary(1); state["Zone"] = Zone; return state; } public abstract WebPart GetWebPart(WebPartDescription description); protected internal override void OnPreRender(EventArgs e) { base.OnPreRender(e); if (Zone == null) { throw new InvalidOperationException(SR.GetString(SR.CatalogPart_MustBeInZone, ID)); } } [SecurityPermission(SecurityAction.Demand, Unrestricted = true)] protected override void SetDesignModeState(IDictionary data) { if (data != null) { object o = data["Zone"]; if (o != null) { SetZone((CatalogZoneBase)o); } } } internal void SetWebPartManager(WebPartManager webPartManager) { _webPartManager = webPartManager; } internal void SetZone(CatalogZoneBase zone) { _zone = zone; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI.WebControls.WebParts { using System; using System.Collections; using System.Collections.Specialized; using System.ComponentModel; using System.Diagnostics; using System.Globalization; using System.Security.Permissions; using System.Web.UI; ////// Provides default rendering and part selection UI /// [ Bindable(false), Designer("System.Web.UI.Design.WebControls.WebParts.CatalogPartDesigner, " + AssemblyRef.SystemDesign), ] [AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)] [AspNetHostingPermission(SecurityAction.InheritanceDemand, Level=AspNetHostingPermissionLevel.Minimal)] public abstract class CatalogPart : Part { private WebPartManager _webPartManager; private CatalogZoneBase _zone; [ Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden) ] public string DisplayTitle { get { string displayTitle = Title; if (String.IsNullOrEmpty(displayTitle)) { displayTitle = SR.GetString(SR.Part_Untitled); } return displayTitle; } } protected WebPartManager WebPartManager { get { return _webPartManager; } } protected CatalogZoneBase Zone { get { return _zone; } } public abstract WebPartDescriptionCollection GetAvailableWebPartDescriptions(); [SecurityPermission(SecurityAction.Demand, Unrestricted = true)] protected override IDictionary GetDesignModeState() { IDictionary state = new HybridDictionary(1); state["Zone"] = Zone; return state; } public abstract WebPart GetWebPart(WebPartDescription description); protected internal override void OnPreRender(EventArgs e) { base.OnPreRender(e); if (Zone == null) { throw new InvalidOperationException(SR.GetString(SR.CatalogPart_MustBeInZone, ID)); } } [SecurityPermission(SecurityAction.Demand, Unrestricted = true)] protected override void SetDesignModeState(IDictionary data) { if (data != null) { object o = data["Zone"]; if (o != null) { SetZone((CatalogZoneBase)o); } } } internal void SetWebPartManager(WebPartManager webPartManager) { _webPartManager = webPartManager; } internal void SetZone(CatalogZoneBase zone) { _zone = zone; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- QuaternionRotation3D.cs
- TextSpanModifier.cs
- ImageButton.cs
- ReadOnlyDictionary.cs
- Typeface.cs
- DATA_BLOB.cs
- Constants.cs
- ColorContext.cs
- DbConnectionPoolCounters.cs
- DoWorkEventArgs.cs
- BaseCAMarshaler.cs
- ColumnResult.cs
- SqlCacheDependencyDatabaseCollection.cs
- LinearGradientBrush.cs
- EventDescriptor.cs
- RandomDelaySendsAsyncResult.cs
- BufferAllocator.cs
- ReachIDocumentPaginatorSerializerAsync.cs
- SqlAliasesReferenced.cs
- DbDataReader.cs
- JavascriptXmlWriterWrapper.cs
- MouseOverProperty.cs
- DoubleAnimationUsingPath.cs
- DrawingAttributeSerializer.cs
- ListSortDescription.cs
- GridViewRowEventArgs.cs
- CssTextWriter.cs
- TagPrefixInfo.cs
- MessageBodyDescription.cs
- NumberSubstitution.cs
- DesignTimeParseData.cs
- Int16Converter.cs
- FormViewDeletedEventArgs.cs
- LinearGradientBrush.cs
- WindowPattern.cs
- SqlTransaction.cs
- Baml2006Reader.cs
- RegisteredArrayDeclaration.cs
- StylusCaptureWithinProperty.cs
- PolicyManager.cs
- ItemsControlAutomationPeer.cs
- CodeGen.cs
- ZipArchive.cs
- TypeSystem.cs
- ZoomPercentageConverter.cs
- IndexedEnumerable.cs
- LayoutEvent.cs
- CriticalExceptions.cs
- GradientStop.cs
- EntitySqlQueryCacheKey.cs
- CommonGetThemePartSize.cs
- SimpleApplicationHost.cs
- XmlDataDocument.cs
- OutputScopeManager.cs
- _AuthenticationState.cs
- EdmSchemaError.cs
- StylusButtonEventArgs.cs
- XPathDocumentIterator.cs
- UniqueConstraint.cs
- XmlValueConverter.cs
- RequestCacheValidator.cs
- DataReceivedEventArgs.cs
- FunctionDetailsReader.cs
- ArcSegment.cs
- DesignSurfaceManager.cs
- AccessedThroughPropertyAttribute.cs
- DataGridHelper.cs
- UnsettableComboBox.cs
- DocumentScope.cs
- EdmComplexTypeAttribute.cs
- MessageSecurityVersionConverter.cs
- DataGridBoolColumn.cs
- TearOffProxy.cs
- AliasedExpr.cs
- HScrollProperties.cs
- BinaryObjectWriter.cs
- XsltQilFactory.cs
- Certificate.cs
- RadioButtonRenderer.cs
- UpdatePanel.cs
- ErrorBehavior.cs
- ValueSerializer.cs
- SQLInt32Storage.cs
- AutomationTextAttribute.cs
- XmlName.cs
- CheckBoxAutomationPeer.cs
- RoleManagerModule.cs
- DataPagerFieldCommandEventArgs.cs
- XDRSchema.cs
- SelectionGlyph.cs
- Int32CAMarshaler.cs
- EntityViewGenerator.cs
- Native.cs
- BlobPersonalizationState.cs
- Int16AnimationBase.cs
- GCHandleCookieTable.cs
- ZoneButton.cs
- CachedPathData.cs
- HostedHttpRequestAsyncResult.cs
- WebSysDescriptionAttribute.cs