Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / ndp / fx / src / xsp / System / Web / UI / WebParts / WebPartRestoreVerb.cs / 1 / WebPartRestoreVerb.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.Web.UI.WebControls.WebParts {
using System;
internal sealed class WebPartRestoreVerb : WebPartActionVerb {
private string _defaultDescription;
private string _defaultText;
private string DefaultDescription {
get {
if (_defaultDescription == null) {
_defaultDescription = SR.GetString(SR.WebPartRestoreVerb_Description);
}
return _defaultDescription;
}
}
private string DefaultText {
get {
if (_defaultText == null) {
_defaultText = SR.GetString(SR.WebPartRestoreVerb_Text);
}
return _defaultText;
}
}
// Properties must look at viewstate directly instead of the property in the base class,
// so we can distinguish between an unset property and a property set to String.Empty.
[
WebSysDefaultValue(SR.WebPartRestoreVerb_Description)
]
public override string Description {
get {
object o = ViewState["Description"];
return (o == null) ? DefaultDescription : (string)o;
}
set {
ViewState["Description"] = value;
}
}
[
WebSysDefaultValue(SR.WebPartRestoreVerb_Text)
]
public override string Text {
get {
object o = ViewState["Text"];
return (o == null) ? DefaultText : (string)o;
}
set {
ViewState["Text"] = value;
}
}
}
}
// 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;
internal sealed class WebPartRestoreVerb : WebPartActionVerb {
private string _defaultDescription;
private string _defaultText;
private string DefaultDescription {
get {
if (_defaultDescription == null) {
_defaultDescription = SR.GetString(SR.WebPartRestoreVerb_Description);
}
return _defaultDescription;
}
}
private string DefaultText {
get {
if (_defaultText == null) {
_defaultText = SR.GetString(SR.WebPartRestoreVerb_Text);
}
return _defaultText;
}
}
// Properties must look at viewstate directly instead of the property in the base class,
// so we can distinguish between an unset property and a property set to String.Empty.
[
WebSysDefaultValue(SR.WebPartRestoreVerb_Description)
]
public override string Description {
get {
object o = ViewState["Description"];
return (o == null) ? DefaultDescription : (string)o;
}
set {
ViewState["Description"] = value;
}
}
[
WebSysDefaultValue(SR.WebPartRestoreVerb_Text)
]
public override string Text {
get {
object o = ViewState["Text"];
return (o == null) ? DefaultText : (string)o;
}
set {
ViewState["Text"] = value;
}
}
}
}
// 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
- SrgsNameValueTag.cs
- FlowDocumentReaderAutomationPeer.cs
- Label.cs
- BindingCollectionElement.cs
- LinkButton.cs
- LinkConverter.cs
- EventWaitHandleSecurity.cs
- Bits.cs
- TextRangeBase.cs
- SchemaCompiler.cs
- MetaModel.cs
- PersistenceException.cs
- Compiler.cs
- ListBoxItemAutomationPeer.cs
- WebPartDisplayMode.cs
- FileInfo.cs
- GregorianCalendar.cs
- SettingsPropertyIsReadOnlyException.cs
- Item.cs
- AuthenticationService.cs
- IUnknownConstantAttribute.cs
- XPathDocument.cs
- InstanceNotFoundException.cs
- UserControlFileEditor.cs
- DataGridViewRowErrorTextNeededEventArgs.cs
- DataGridBoolColumn.cs
- LoginUtil.cs
- RectangleConverter.cs
- NativeRightsManagementAPIsStructures.cs
- PolyLineSegment.cs
- wgx_sdk_version.cs
- NegotiateStream.cs
- HtmlInputSubmit.cs
- TextPattern.cs
- SelectedGridItemChangedEvent.cs
- TypeListConverter.cs
- ExpressionSelection.cs
- ExtenderProvidedPropertyAttribute.cs
- x509utils.cs
- UnsafeNativeMethods.cs
- SchemaElementLookUpTable.cs
- EventBuilder.cs
- Source.cs
- CompareValidator.cs
- HwndSourceParameters.cs
- LinkedList.cs
- SystemUnicastIPAddressInformation.cs
- WizardForm.cs
- WebPartEditorOkVerb.cs
- UrlMappingsModule.cs
- WindowShowOrOpenTracker.cs
- Crc32.cs
- TailCallAnalyzer.cs
- StaticExtension.cs
- StrokeCollection2.cs
- SupportsEventValidationAttribute.cs
- DeviceContext2.cs
- FlowDocumentScrollViewer.cs
- ImportedNamespaceContextItem.cs
- ProgressBarRenderer.cs
- _BaseOverlappedAsyncResult.cs
- FontUnitConverter.cs
- PersonalizationEntry.cs
- Line.cs
- PageRanges.cs
- Clock.cs
- SafeTimerHandle.cs
- ItemCheckedEvent.cs
- CustomValidator.cs
- OutOfMemoryException.cs
- PackageStore.cs
- XmlAnyElementAttribute.cs
- WorkflowRuntimeBehavior.cs
- Transform.cs
- ComponentSerializationService.cs
- CatalogPart.cs
- IndependentlyAnimatedPropertyMetadata.cs
- StructuredCompositeActivityDesigner.cs
- RelatedPropertyManager.cs
- ServiceBehaviorAttribute.cs
- SafeNativeMethodsOther.cs
- DefaultProxySection.cs
- GeneratedContractType.cs
- sqlcontext.cs
- SudsWriter.cs
- DataServiceContext.cs
- Pen.cs
- HitTestWithGeometryDrawingContextWalker.cs
- MetadataArtifactLoaderResource.cs
- BackgroundFormatInfo.cs
- TypeForwardedToAttribute.cs
- ResourceSet.cs
- TypePropertyEditor.cs
- AssemblyResourceLoader.cs
- COM2ColorConverter.cs
- ColorAnimationBase.cs
- TdsParameterSetter.cs
- OleDbStruct.cs
- UnitControl.cs
- PtsHelper.cs