Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / UI / WebParts / WebPartMinimizeVerb.cs / 1305376 / WebPartMinimizeVerb.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI.WebControls.WebParts { using System; internal sealed class WebPartMinimizeVerb : WebPartActionVerb { private string _defaultDescription; private string _defaultText; private string DefaultDescription { get { if (_defaultDescription == null) { _defaultDescription = SR.GetString(SR.WebPartMinimizeVerb_Description); } return _defaultDescription; } } private string DefaultText { get { if (_defaultText == null) { _defaultText = SR.GetString(SR.WebPartMinimizeVerb_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.WebPartMinimizeVerb_Description) ] public override string Description { get { object o = ViewState["Description"]; return (o == null) ? DefaultDescription : (string)o; } set { ViewState["Description"] = value; } } [ WebSysDefaultValue(SR.WebPartMinimizeVerb_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 WebPartMinimizeVerb : WebPartActionVerb { private string _defaultDescription; private string _defaultText; private string DefaultDescription { get { if (_defaultDescription == null) { _defaultDescription = SR.GetString(SR.WebPartMinimizeVerb_Description); } return _defaultDescription; } } private string DefaultText { get { if (_defaultText == null) { _defaultText = SR.GetString(SR.WebPartMinimizeVerb_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.WebPartMinimizeVerb_Description) ] public override string Description { get { object o = ViewState["Description"]; return (o == null) ? DefaultDescription : (string)o; } set { ViewState["Description"] = value; } } [ WebSysDefaultValue(SR.WebPartMinimizeVerb_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
- SiteOfOriginPart.cs
- ExtractedStateEntry.cs
- RecognizedWordUnit.cs
- RTLAwareMessageBox.cs
- PolyLineSegmentFigureLogic.cs
- StylusPoint.cs
- SHA1CryptoServiceProvider.cs
- KeyValuePairs.cs
- Int16AnimationBase.cs
- InkCanvasFeedbackAdorner.cs
- Point.cs
- SoapSchemaExporter.cs
- AsymmetricKeyExchangeFormatter.cs
- WmfPlaceableFileHeader.cs
- EntitySetBase.cs
- EventData.cs
- HitTestFilterBehavior.cs
- EncryptedPackageFilter.cs
- COSERVERINFO.cs
- CodeTypeConstructor.cs
- XmlLinkedNode.cs
- DurableServiceAttribute.cs
- CustomServiceCredentials.cs
- SafeNativeMethods.cs
- _ProxyRegBlob.cs
- GridViewRowEventArgs.cs
- FontFamily.cs
- SymLanguageVendor.cs
- _ScatterGatherBuffers.cs
- RuntimeConfigurationRecord.cs
- NamedPipeTransportManager.cs
- DbCommandDefinition.cs
- GuidelineCollection.cs
- Brush.cs
- TemplateInstanceAttribute.cs
- ReferencedCollectionType.cs
- SemaphoreSecurity.cs
- TextTreeDeleteContentUndoUnit.cs
- BufferedGraphicsManager.cs
- ActivationServices.cs
- DataBoundControl.cs
- WindowPatternIdentifiers.cs
- DbConnectionPoolOptions.cs
- CodeMemberField.cs
- CapacityStreamGeometryContext.cs
- ScriptBehaviorDescriptor.cs
- HttpPostedFileBase.cs
- ConfigXmlDocument.cs
- MouseActionConverter.cs
- ListItemCollection.cs
- HostedElements.cs
- ReservationNotFoundException.cs
- BindableTemplateBuilder.cs
- PackageRelationshipSelector.cs
- TreeViewAutomationPeer.cs
- DataPagerFieldCommandEventArgs.cs
- SizeAnimationClockResource.cs
- StringDictionary.cs
- HostingEnvironmentWrapper.cs
- CompModSwitches.cs
- EntityViewGenerator.cs
- ControlTemplate.cs
- SafeTimerHandle.cs
- ReflectPropertyDescriptor.cs
- StrokeCollection.cs
- XamlRtfConverter.cs
- AccessDataSourceView.cs
- ResourceAttributes.cs
- ExceptionUtil.cs
- Control.cs
- KeyPressEvent.cs
- InputScope.cs
- ImageListDesigner.cs
- TextRangeAdaptor.cs
- fixedPageContentExtractor.cs
- OneOfConst.cs
- BulletedListEventArgs.cs
- BasicKeyConstraint.cs
- arclist.cs
- PathGeometry.cs
- DynamicResourceExtension.cs
- ObjectDataSourceDisposingEventArgs.cs
- WebReferencesBuildProvider.cs
- DataGrid.cs
- SqlVisitor.cs
- KeyEvent.cs
- EncryptedPackageFilter.cs
- DeferredReference.cs
- Delegate.cs
- NamedPermissionSet.cs
- TouchEventArgs.cs
- ServiceNameCollection.cs
- CurrentChangedEventManager.cs
- ActivityCodeDomSerializer.cs
- DesignerActionUIService.cs
- BitmapMetadata.cs
- MultiTrigger.cs
- RpcAsyncResult.cs
- GenericQueueSurrogate.cs
- Metadata.cs