Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / UI / WebParts / WebPartRestoreVerb.cs / 1305376 / 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
- SchemaImporter.cs
- FontWeightConverter.cs
- WindowPatternIdentifiers.cs
- ObjectPersistData.cs
- FrugalMap.cs
- BevelBitmapEffect.cs
- Geometry.cs
- QuaternionRotation3D.cs
- XmlSchemaAnnotated.cs
- EntityWrapper.cs
- ValueHandle.cs
- StateDesignerConnector.cs
- DrawingContextDrawingContextWalker.cs
- DesignerAdRotatorAdapter.cs
- CacheEntry.cs
- SafeThemeHandle.cs
- WebBrowserBase.cs
- PackageDocument.cs
- DrawingDrawingContext.cs
- ParenExpr.cs
- AttachedAnnotation.cs
- XmlWriterTraceListener.cs
- documentsequencetextpointer.cs
- PropertyGrid.cs
- GridItem.cs
- TimeSpanMinutesConverter.cs
- CompensationTokenData.cs
- SqlGatherProducedAliases.cs
- ScriptDescriptor.cs
- CompressEmulationStream.cs
- FileChangesMonitor.cs
- SessionPageStateSection.cs
- TextFindEngine.cs
- remotingproxy.cs
- Baml2006Reader.cs
- InvalidDataException.cs
- SoapIgnoreAttribute.cs
- DoubleAnimation.cs
- ExecutedRoutedEventArgs.cs
- HtmlGenericControl.cs
- RemotingAttributes.cs
- HttpResponseInternalWrapper.cs
- XhtmlBasicImageAdapter.cs
- LoggedException.cs
- XslTransform.cs
- TcpHostedTransportConfiguration.cs
- AnnotationAdorner.cs
- SerializationFieldInfo.cs
- ApplicationSecurityManager.cs
- HtmlFormAdapter.cs
- FloatUtil.cs
- AtomServiceDocumentSerializer.cs
- UrlPath.cs
- RMEnrollmentPage1.cs
- CookieProtection.cs
- StatusBarDrawItemEvent.cs
- DetailsViewRow.cs
- Convert.cs
- SqlFacetAttribute.cs
- Events.cs
- SafeNativeMethods.cs
- Brush.cs
- Size.cs
- DSASignatureDeformatter.cs
- MSHTMLHost.cs
- AssemblyResourceLoader.cs
- SystemResourceKey.cs
- DrawingContextDrawingContextWalker.cs
- ProjectedSlot.cs
- SeekableMessageNavigator.cs
- WebBrowserHelper.cs
- ProcessHostFactoryHelper.cs
- RemotingException.cs
- TaskFormBase.cs
- PkcsUtils.cs
- OdbcFactory.cs
- COM2EnumConverter.cs
- PreviewKeyDownEventArgs.cs
- UnsafeNativeMethodsMilCoreApi.cs
- OracleBoolean.cs
- _BufferOffsetSize.cs
- TextEndOfSegment.cs
- Interlocked.cs
- Preprocessor.cs
- ToolboxService.cs
- BitmapEffectCollection.cs
- DebugInfoGenerator.cs
- CancellationHandlerDesigner.cs
- AssemblyEvidenceFactory.cs
- COM2Properties.cs
- DataGridComponentEditor.cs
- VisualStyleTypesAndProperties.cs
- SymLanguageVendor.cs
- NativeStructs.cs
- safex509handles.cs
- BuildProviderAppliesToAttribute.cs
- RemotingServices.cs
- CollectionChangedEventManager.cs
- messageonlyhwndwrapper.cs
- NetworkStream.cs