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
- XamlFxTrace.cs
- CodeSnippetExpression.cs
- Button.cs
- SmiContextFactory.cs
- ADMembershipProvider.cs
- Converter.cs
- LinearGradientBrush.cs
- TextDecorationCollection.cs
- ParserOptions.cs
- RoleServiceManager.cs
- ImageInfo.cs
- ConfigXmlComment.cs
- DataGridViewRow.cs
- SchemaCollectionPreprocessor.cs
- ProtocolException.cs
- ToggleButtonAutomationPeer.cs
- OdbcDataAdapter.cs
- PolyBezierSegment.cs
- Timeline.cs
- ToolStripPanelRenderEventArgs.cs
- FormsAuthenticationEventArgs.cs
- SpellerError.cs
- FolderBrowserDialogDesigner.cs
- BinaryReader.cs
- IntSecurity.cs
- FigureParagraph.cs
- UnmanagedMarshal.cs
- StylusCaptureWithinProperty.cs
- RuleConditionDialog.cs
- XmlAttributeOverrides.cs
- MailAddressCollection.cs
- Compiler.cs
- DoubleCollectionConverter.cs
- SpellerHighlightLayer.cs
- PageThemeParser.cs
- BindingExpressionUncommonField.cs
- DispatcherExceptionFilterEventArgs.cs
- HexParser.cs
- ProxyAttribute.cs
- TextProperties.cs
- Win32MouseDevice.cs
- SspiSecurityTokenProvider.cs
- TypeInitializationException.cs
- MobileControlsSection.cs
- TiffBitmapEncoder.cs
- MetadataSerializer.cs
- DiagnosticTrace.cs
- TextParagraphCache.cs
- BasicExpandProvider.cs
- WorkflowApplicationCompletedException.cs
- EmbeddedObject.cs
- ProcessHostMapPath.cs
- ScrollBarAutomationPeer.cs
- Line.cs
- MachineKey.cs
- RegexCode.cs
- XPathDocument.cs
- PowerModeChangedEventArgs.cs
- EnterpriseServicesHelper.cs
- SQLMembershipProvider.cs
- NativeMethods.cs
- StrongNameKeyPair.cs
- Size3D.cs
- ErrorTableItemStyle.cs
- SettingsPropertyNotFoundException.cs
- CounterSet.cs
- PriorityQueue.cs
- SystemNetworkInterface.cs
- SqlLiftWhereClauses.cs
- PolyQuadraticBezierSegment.cs
- DistinctQueryOperator.cs
- SmiGettersStream.cs
- DuplicateWaitObjectException.cs
- AppDomainAttributes.cs
- FragmentQueryKB.cs
- AuthenticationModuleElementCollection.cs
- ParserStreamGeometryContext.cs
- ReachIDocumentPaginatorSerializer.cs
- ChangeNode.cs
- Currency.cs
- SoapAttributeAttribute.cs
- StoragePropertyMapping.cs
- XmlComment.cs
- PagedDataSource.cs
- EFDataModelProvider.cs
- ModifierKeysConverter.cs
- AssertSection.cs
- OutOfProcStateClientManager.cs
- IndicShape.cs
- EtwProvider.cs
- MSAAEventDispatcher.cs
- UTF8Encoding.cs
- DataGridLinkButton.cs
- TextBreakpoint.cs
- DataTableExtensions.cs
- MonitoringDescriptionAttribute.cs
- TextBox.cs
- GuidConverter.cs
- BigInt.cs
- SingleStorage.cs