Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / UI / WebParts / CatalogPart.cs / 1305376 / 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), ] 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), ] 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
- EndEvent.cs
- webproxy.cs
- WithStatement.cs
- GenericTextProperties.cs
- FormViewModeEventArgs.cs
- XmlAutoDetectWriter.cs
- AudioLevelUpdatedEventArgs.cs
- DbConnectionStringBuilder.cs
- ListView.cs
- XPathArrayIterator.cs
- EventlogProvider.cs
- DbDataAdapter.cs
- QueueSurrogate.cs
- Point4D.cs
- ToolStripSplitStackLayout.cs
- FontEmbeddingManager.cs
- KeyEventArgs.cs
- HashCoreRequest.cs
- DoubleCollectionValueSerializer.cs
- AppDomainProtocolHandler.cs
- SequenceFullException.cs
- DataGridViewAdvancedBorderStyle.cs
- ProcessRequestArgs.cs
- ConditionBrowserDialog.cs
- UpdateCompiler.cs
- ColorPalette.cs
- DataSourceControlBuilder.cs
- FixedSOMElement.cs
- NodeCounter.cs
- TypeConverters.cs
- MemoryMappedViewStream.cs
- MembershipPasswordException.cs
- DataGridViewRowsAddedEventArgs.cs
- TraceSection.cs
- AnnotationResource.cs
- SystemPens.cs
- Trace.cs
- ScrollBar.cs
- CharStorage.cs
- MetadataUtilsSmi.cs
- RemoteWebConfigurationHostServer.cs
- SqlNamer.cs
- BaseCollection.cs
- ReaderOutput.cs
- HierarchicalDataBoundControl.cs
- DiagnosticsConfigurationHandler.cs
- ApplicationServiceManager.cs
- InputElement.cs
- XMLSchema.cs
- ExpressionBindingCollection.cs
- ProviderException.cs
- Item.cs
- SimpleWebHandlerParser.cs
- MarkupExtensionParser.cs
- DependentList.cs
- InheritedPropertyChangedEventArgs.cs
- PropertyEntry.cs
- InProcStateClientManager.cs
- TabletDevice.cs
- HttpVersion.cs
- HttpException.cs
- AssemblyGen.cs
- AlphaSortedEnumConverter.cs
- ListCollectionView.cs
- GetWinFXPath.cs
- CLRBindingWorker.cs
- HttpApplicationFactory.cs
- ProjectionAnalyzer.cs
- InvalidOperationException.cs
- Helper.cs
- ExcludeFromCodeCoverageAttribute.cs
- XmlLanguage.cs
- HTTPNotFoundHandler.cs
- DSACryptoServiceProvider.cs
- Setter.cs
- PeerToPeerException.cs
- SmtpClient.cs
- TextServicesProperty.cs
- OdbcConnectionPoolProviderInfo.cs
- SerializationFieldInfo.cs
- ClientConfigPaths.cs
- XmlIgnoreAttribute.cs
- IPGlobalProperties.cs
- ImageSource.cs
- SecureEnvironment.cs
- Perspective.cs
- _NestedSingleAsyncResult.cs
- FormViewModeEventArgs.cs
- ColumnReorderedEventArgs.cs
- TextEditorLists.cs
- QilPatternFactory.cs
- NavigationWindowAutomationPeer.cs
- KeyGestureConverter.cs
- versioninfo.cs
- CodeStatementCollection.cs
- XslNumber.cs
- MSAANativeProvider.cs
- BasicExpressionVisitor.cs
- StatusStrip.cs
- MetadataUtil.cs