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
- IdentitySection.cs
- RelatedPropertyManager.cs
- ListViewGroupConverter.cs
- Convert.cs
- SqlErrorCollection.cs
- Double.cs
- EventDescriptor.cs
- HuffmanTree.cs
- ServerIdentity.cs
- DelegateSerializationHolder.cs
- ObjectStateEntry.cs
- SoapInteropTypes.cs
- ConfigurationElementCollection.cs
- ListViewItemEventArgs.cs
- FragmentQueryKB.cs
- XmlWhitespace.cs
- DesignerContextDescriptor.cs
- SpotLight.cs
- GridViewHeaderRowPresenter.cs
- SqlBulkCopy.cs
- OverrideMode.cs
- PaperSource.cs
- CqlErrorHelper.cs
- BitmapEffectState.cs
- RevocationPoint.cs
- Table.cs
- FlowDocumentFormatter.cs
- LineProperties.cs
- Point4DValueSerializer.cs
- SimpleApplicationHost.cs
- HtmlControlPersistable.cs
- DataGridColumnHeaderItemAutomationPeer.cs
- CornerRadius.cs
- SqlBinder.cs
- TemplateControlParser.cs
- Ipv6Element.cs
- SettingsSection.cs
- ExtensionWindowHeader.cs
- HttpPostedFileWrapper.cs
- log.cs
- _RequestCacheProtocol.cs
- returneventsaver.cs
- DecimalFormatter.cs
- DownloadProgressEventArgs.cs
- XPathMessageFilterElementCollection.cs
- QueryCursorEventArgs.cs
- HelpFileFileNameEditor.cs
- WindowsNonControl.cs
- DummyDataSource.cs
- PasswordDeriveBytes.cs
- XmlEncodedRawTextWriter.cs
- CacheForPrimitiveTypes.cs
- QuadraticBezierSegment.cs
- oledbmetadatacollectionnames.cs
- Control.cs
- StickyNoteAnnotations.cs
- LinkLabelLinkClickedEvent.cs
- SqlConnectionHelper.cs
- LiteralText.cs
- DesignObjectWrapper.cs
- ServiceAuthorizationElement.cs
- SqlCharStream.cs
- SelectionItemPattern.cs
- ProxyAssemblyNotLoadedException.cs
- QueryOutputWriter.cs
- SchemaMapping.cs
- MetaTable.cs
- InvalidOleVariantTypeException.cs
- ByteAnimation.cs
- SerializableAttribute.cs
- HandledMouseEvent.cs
- WindowsEditBoxRange.cs
- WorkflowViewStateService.cs
- ResXBuildProvider.cs
- UnsafeNetInfoNativeMethods.cs
- Claim.cs
- BufferedStream.cs
- NameValueFileSectionHandler.cs
- BaseDataList.cs
- ServiceNameElementCollection.cs
- DbProviderFactories.cs
- EndEvent.cs
- BindingListCollectionView.cs
- MorphHelper.cs
- ClientUrlResolverWrapper.cs
- ClassicBorderDecorator.cs
- InvokeHandlers.cs
- IResourceProvider.cs
- codemethodreferenceexpression.cs
- SignatureHelper.cs
- GraphicsState.cs
- XmlTextReaderImpl.cs
- LiteralText.cs
- DesignerUtility.cs
- DocumentGridContextMenu.cs
- DATA_BLOB.cs
- XmlUrlResolver.cs
- CodeActivity.cs
- SuppressMessageAttribute.cs
- OneOfElement.cs