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
- FaultReason.cs
- AssemblyCollection.cs
- CommandDesigner.cs
- CacheEntry.cs
- ReflectionTypeLoadException.cs
- LicFileLicenseProvider.cs
- InheritablePropertyChangeInfo.cs
- SecurityTokenSerializer.cs
- MimeReturn.cs
- ProgressBarRenderer.cs
- Console.cs
- PeerApplication.cs
- ExceptionRoutedEventArgs.cs
- SystemSounds.cs
- Point3D.cs
- AnnotationResource.cs
- SHA512Managed.cs
- FileLoadException.cs
- ColorIndependentAnimationStorage.cs
- BitConverter.cs
- ValidationError.cs
- PostBackTrigger.cs
- SimpleHandlerFactory.cs
- PageCatalogPart.cs
- SamlConstants.cs
- WizardStepBase.cs
- IdentifierCreationService.cs
- XmlQualifiedName.cs
- HttpPostLocalhostServerProtocol.cs
- IntMinMaxAggregationOperator.cs
- UserInitiatedRoutedEventPermissionAttribute.cs
- CommandField.cs
- TypeDelegator.cs
- RepeaterItem.cs
- ILGenerator.cs
- ColumnMapTranslator.cs
- Publisher.cs
- TypeValidationEventArgs.cs
- TimeManager.cs
- MatrixAnimationUsingKeyFrames.cs
- CompletionBookmark.cs
- InputLanguageCollection.cs
- SortFieldComparer.cs
- BrowserDefinitionCollection.cs
- AppSettingsSection.cs
- FileSystemWatcher.cs
- DescendentsWalker.cs
- documentsequencetextcontainer.cs
- X509ChainPolicy.cs
- RowUpdatedEventArgs.cs
- UseManagedPresentationElement.cs
- DefinitionUpdate.cs
- ClientBuildManager.cs
- ExclusiveNamedPipeTransportManager.cs
- ToolZoneDesigner.cs
- QueryInterceptorAttribute.cs
- DbProviderConfigurationHandler.cs
- TimerElapsedEvenArgs.cs
- PageTheme.cs
- ObjectCacheSettings.cs
- HighlightOverlayGlyph.cs
- TiffBitmapDecoder.cs
- Util.cs
- ActivityTypeResolver.xaml.cs
- WebControlParameterProxy.cs
- PublisherMembershipCondition.cs
- PerformanceCounter.cs
- TouchEventArgs.cs
- SafeEventLogWriteHandle.cs
- LambdaExpression.cs
- SqlRewriteScalarSubqueries.cs
- DataBindingCollectionEditor.cs
- InfiniteTimeSpanConverter.cs
- ReadWriteSpinLock.cs
- NativeWindow.cs
- ObjectHandle.cs
- URIFormatException.cs
- Request.cs
- TaskExtensions.cs
- SourceElementsCollection.cs
- ListCommandEventArgs.cs
- TextElement.cs
- WebPart.cs
- PointValueSerializer.cs
- SerializationFieldInfo.cs
- WorkflowInstanceTerminatedRecord.cs
- ReadOnlyTernaryTree.cs
- PageHandlerFactory.cs
- MailWriter.cs
- MessageQueuePermissionAttribute.cs
- ColorMatrix.cs
- SmiContext.cs
- ObjectConverter.cs
- XmlNodeReader.cs
- NameValueFileSectionHandler.cs
- HMACRIPEMD160.cs
- SpellCheck.cs
- Utils.cs
- CodeGen.cs
- DataRecordInternal.cs