Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / DEVDIV / depot / DevDiv / releases / whidbey / QFE / ndp / fx / src / xsp / System / Web / UI / WebParts / WebPartEditVerb.cs / 1 / WebPartEditVerb.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI.WebControls.WebParts { using System; internal sealed class WebPartEditVerb : WebPartActionVerb { private string _defaultDescription; private string _defaultText; private string DefaultDescription { get { if (_defaultDescription == null) { _defaultDescription = SR.GetString(SR.WebPartEditVerb_Description); } return _defaultDescription; } } private string DefaultText { get { if (_defaultText == null) { _defaultText = SR.GetString(SR.WebPartEditVerb_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.WebPartEditVerb_Description) ] public override string Description { get { object o = ViewState["Description"]; return (o == null) ? DefaultDescription : (string)o; } set { ViewState["Description"] = value; } } [ WebSysDefaultValue(SR.WebPartEditVerb_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. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI.WebControls.WebParts { using System; internal sealed class WebPartEditVerb : WebPartActionVerb { private string _defaultDescription; private string _defaultText; private string DefaultDescription { get { if (_defaultDescription == null) { _defaultDescription = SR.GetString(SR.WebPartEditVerb_Description); } return _defaultDescription; } } private string DefaultText { get { if (_defaultText == null) { _defaultText = SR.GetString(SR.WebPartEditVerb_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.WebPartEditVerb_Description) ] public override string Description { get { object o = ViewState["Description"]; return (o == null) ? DefaultDescription : (string)o; } set { ViewState["Description"] = value; } } [ WebSysDefaultValue(SR.WebPartEditVerb_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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- IOThreadScheduler.cs
- ServiceObjectContainer.cs
- SafeLocalMemHandle.cs
- NonPrimarySelectionGlyph.cs
- UICuesEvent.cs
- MobileSysDescriptionAttribute.cs
- SizeAnimationClockResource.cs
- Vector3DKeyFrameCollection.cs
- CallbackValidator.cs
- Pens.cs
- ReadOnlyMetadataCollection.cs
- VarRefManager.cs
- TreeNodeSelectionProcessor.cs
- SerializationEventsCache.cs
- MatrixCamera.cs
- RoleManagerSection.cs
- FormatConvertedBitmap.cs
- GeometryCollection.cs
- NameTable.cs
- HttpCachePolicyElement.cs
- Keywords.cs
- BitVec.cs
- TogglePattern.cs
- CodeGotoStatement.cs
- MultitargetUtil.cs
- DetailsViewRowCollection.cs
- PropertyValueChangedEvent.cs
- WebPartConnectionsCancelEventArgs.cs
- CharEntityEncoderFallback.cs
- PeerSecurityManager.cs
- UnmanagedMarshal.cs
- DataSourceXmlSerializationAttribute.cs
- SerializableTypeCodeDomSerializer.cs
- ColumnHeaderCollectionEditor.cs
- ResourceDisplayNameAttribute.cs
- RadioButtonRenderer.cs
- ToolStripContentPanelRenderEventArgs.cs
- OutputCacheSection.cs
- TypeKeyValue.cs
- VisualCollection.cs
- HealthMonitoringSection.cs
- ImageCodecInfoPrivate.cs
- QueryContinueDragEvent.cs
- CodeMethodInvokeExpression.cs
- SubstitutionList.cs
- SectionRecord.cs
- IDictionary.cs
- CriticalExceptions.cs
- HexParser.cs
- SQLDateTimeStorage.cs
- QueryContinueDragEvent.cs
- XPathNodeIterator.cs
- SqlResolver.cs
- DesignerProperties.cs
- Brushes.cs
- NameNode.cs
- BookmarkEventArgs.cs
- XmlDataCollection.cs
- dataprotectionpermission.cs
- ManifestResourceInfo.cs
- HtmlToClrEventProxy.cs
- EventLogLink.cs
- BoundColumn.cs
- StreamingContext.cs
- RuntimeHandles.cs
- WebEventCodes.cs
- SqlDataReaderSmi.cs
- RC2CryptoServiceProvider.cs
- FontInfo.cs
- ServerIdentity.cs
- Latin1Encoding.cs
- XmlDataProvider.cs
- TextWriter.cs
- SocketAddress.cs
- XmlToDatasetMap.cs
- GridViewSelectEventArgs.cs
- TextSpan.cs
- TTSVoice.cs
- PropertyKey.cs
- MetadataUtilsSmi.cs
- ObjectSecurity.cs
- IndexedGlyphRun.cs
- GeneralTransform3DGroup.cs
- CodeTryCatchFinallyStatement.cs
- VariableElement.cs
- SqlDataReader.cs
- TextProviderWrapper.cs
- unsafenativemethodstextservices.cs
- AxHost.cs
- ICspAsymmetricAlgorithm.cs
- TransformationRules.cs
- TextRangeEdit.cs
- TypeElement.cs
- FocusChangedEventArgs.cs
- FragmentNavigationEventArgs.cs
- BamlTreeMap.cs
- LambdaCompiler.Generated.cs
- SchemaImporterExtensionsSection.cs
- ClientSponsor.cs
- ObjectStateFormatter.cs