Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / DEVDIV / depot / DevDiv / releases / whidbey / QFE / 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. //------------------------------------------------------------------------------ //// 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- PenContexts.cs
- GlobalAllocSafeHandle.cs
- ProcessHostServerConfig.cs
- Baml6Assembly.cs
- ResourceReferenceExpressionConverter.cs
- TimeEnumHelper.cs
- XmlSchemaValidator.cs
- ColorConverter.cs
- MouseCaptureWithinProperty.cs
- System.Data.OracleClient_BID.cs
- util.cs
- StylusDownEventArgs.cs
- RepeaterItem.cs
- ErrorLog.cs
- BaseInfoTable.cs
- PageBreakRecord.cs
- DataSourceCache.cs
- ObjectStateManager.cs
- SafeLocalMemHandle.cs
- FileNameEditor.cs
- CompiledWorkflowDefinitionContext.cs
- ListControl.cs
- LongValidator.cs
- BatchServiceHost.cs
- AsymmetricSecurityBindingElement.cs
- _NegotiateClient.cs
- EditorAttribute.cs
- BaseProcessor.cs
- DataGridViewRowEventArgs.cs
- DynamicDocumentPaginator.cs
- SafeCertificateStore.cs
- HashHelper.cs
- StringAttributeCollection.cs
- RegisteredArrayDeclaration.cs
- ClrPerspective.cs
- XmlSequenceWriter.cs
- MbpInfo.cs
- GridViewDeletedEventArgs.cs
- PropertyOverridesTypeEditor.cs
- AsymmetricSignatureDeformatter.cs
- WsatServiceCertificate.cs
- SiteMapDesignerDataSourceView.cs
- CatalogZoneAutoFormat.cs
- ComboBoxItem.cs
- AnnotationHelper.cs
- ContainerParaClient.cs
- QuaternionRotation3D.cs
- MaterialGroup.cs
- ScriptResourceHandler.cs
- Queue.cs
- SettingsAttributeDictionary.cs
- DelegateHelpers.Generated.cs
- Compilation.cs
- FactoryGenerator.cs
- StrongNameMembershipCondition.cs
- VisualStyleInformation.cs
- WebException.cs
- DefaultMergeHelper.cs
- HighContrastHelper.cs
- AutomationPatternInfo.cs
- TabletDeviceInfo.cs
- AtomPub10ServiceDocumentFormatter.cs
- OleDbRowUpdatedEvent.cs
- ExpressionStringBuilder.cs
- Trigger.cs
- WorkflowRuntimeSection.cs
- ComponentResourceManager.cs
- PageThemeCodeDomTreeGenerator.cs
- WorkflowPageSetupDialog.cs
- ConfigurationLocation.cs
- WebPageTraceListener.cs
- SyntaxCheck.cs
- ClaimSet.cs
- CancelEventArgs.cs
- ConsoleKeyInfo.cs
- listviewsubitemcollectioneditor.cs
- SettingsSavedEventArgs.cs
- ClientOperationFormatterProvider.cs
- RadioButtonStandardAdapter.cs
- CustomSignedXml.cs
- WindowsNonControl.cs
- UnsupportedPolicyOptionsException.cs
- ISAPIWorkerRequest.cs
- UriWriter.cs
- EventProviderWriter.cs
- PropertyChangedEventArgs.cs
- DrawingDrawingContext.cs
- ValueUtilsSmi.cs
- AuthorizationRule.cs
- ScrollChangedEventArgs.cs
- AutomationEventArgs.cs
- OdbcParameterCollection.cs
- GenericTypeParameterBuilder.cs
- AliasedExpr.cs
- JumpList.cs
- MachineSettingsSection.cs
- WpfXamlType.cs
- PersonalizationStateInfoCollection.cs
- IsolatedStorage.cs
- ExpressionBinding.cs