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
- HtmlElementErrorEventArgs.cs
- GridViewUpdateEventArgs.cs
- ReflectionUtil.cs
- XmlSchemaSimpleTypeList.cs
- TerminatingOperationBehavior.cs
- WindowsStatic.cs
- ObsoleteAttribute.cs
- FlowDocument.cs
- CharEntityEncoderFallback.cs
- MasterPageBuildProvider.cs
- CodeDefaultValueExpression.cs
- IQueryable.cs
- QueryReaderSettings.cs
- BoolExpr.cs
- HtmlInputText.cs
- ComponentDispatcher.cs
- SqlOuterApplyReducer.cs
- XmlSchemaFacet.cs
- SafeLibraryHandle.cs
- TextEffect.cs
- DecryptRequest.cs
- XmlException.cs
- GridViewColumn.cs
- StyleBamlTreeBuilder.cs
- ProfilePropertyMetadata.cs
- ColorContextHelper.cs
- _ContextAwareResult.cs
- initElementDictionary.cs
- ErrorLog.cs
- TemplateControlParser.cs
- OdbcConnectionString.cs
- SelectedDatesCollection.cs
- regiisutil.cs
- SafeSecurityHandles.cs
- IfAction.cs
- EncodingInfo.cs
- LineBreak.cs
- InsufficientMemoryException.cs
- ObjectQuery.cs
- PropertyEmitter.cs
- TypedElement.cs
- EditorServiceContext.cs
- QueryCursorEventArgs.cs
- Serializer.cs
- metadatamappinghashervisitor.hashsourcebuilder.cs
- RemoteWebConfigurationHostServer.cs
- TextTrailingWordEllipsis.cs
- IconHelper.cs
- DataGridViewCellConverter.cs
- SchemaSetCompiler.cs
- DataSourceConverter.cs
- ProjectionPathSegment.cs
- WebRequestModuleElement.cs
- FileSystemInfo.cs
- DesignerCategoryAttribute.cs
- HtmlImage.cs
- X509Certificate2Collection.cs
- SQLBytes.cs
- CheckedPointers.cs
- TextEditorLists.cs
- FormViewUpdatedEventArgs.cs
- HashSet.cs
- CodeTypeReferenceCollection.cs
- HostVisual.cs
- ExpandSegmentCollection.cs
- RunWorkerCompletedEventArgs.cs
- BitmapData.cs
- DataGridViewRowConverter.cs
- RepeatBehaviorConverter.cs
- ColumnResizeAdorner.cs
- ActiveXSite.cs
- RelationshipEntry.cs
- ModelTypeConverter.cs
- TrustManagerPromptUI.cs
- StaticFileHandler.cs
- MorphHelper.cs
- GradientStop.cs
- CodeLinePragma.cs
- DataGridViewTextBoxColumn.cs
- Setter.cs
- UnionExpr.cs
- TaskDesigner.cs
- WindowsFormsHostAutomationPeer.cs
- TargetControlTypeAttribute.cs
- EditCommandColumn.cs
- SourceLineInfo.cs
- TimerElapsedEvenArgs.cs
- NetNamedPipeBindingElement.cs
- SafeHandle.cs
- Pair.cs
- SchemaNamespaceManager.cs
- _BasicClient.cs
- AsyncOperationManager.cs
- ToolStripRendererSwitcher.cs
- CompilerError.cs
- ObjectDataSourceStatusEventArgs.cs
- AppDomainAttributes.cs
- SectionVisual.cs
- PageThemeCodeDomTreeGenerator.cs
- WindowsFormsSectionHandler.cs