Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / CompMod / System / ComponentModel / PasswordPropertyTextAttribute.cs / 1 / PasswordPropertyTextAttribute.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.ComponentModel { using System; using System.Security.Permissions; ////// If this attribute is placed on a property or a type, its text representation in a property window /// will appear as dots or astrisks to indicate a password field. This indidation in no way /// represents any type of encryption or security. /// [AttributeUsage(AttributeTargets.All)] public sealed class PasswordPropertyTextAttribute : Attribute { ////// Sets the System.ComponentModel.Design.PasswordPropertyText /// attribute by default to true. /// public static readonly PasswordPropertyTextAttribute Yes = new PasswordPropertyTextAttribute(true); ////// Sets the System.ComponentModel.Design.PasswordPropertyText /// attribute by default to false. /// public static readonly PasswordPropertyTextAttribute No = new PasswordPropertyTextAttribute(false); ////// Sets the System.ComponentModel.Design.PasswordPropertyText /// attribute by default to false. /// public static readonly PasswordPropertyTextAttribute Default = No; private bool _password; ////// Creates a default PasswordPropertyTextAttribute. /// public PasswordPropertyTextAttribute() : this(false) { } ////// Creates a PasswordPropertyTextAttribute with the given password value. /// public PasswordPropertyTextAttribute(bool password) { _password = password; } ////// Gets a value indicating if the property this attribute is defined for should be shown as password text. /// public bool Password { get { return _password; } } ////// Overload for object equality /// public override bool Equals(object o) { if (o is PasswordPropertyTextAttribute) { return ((PasswordPropertyTextAttribute)o).Password == _password; } return false; } ////// Returns the hashcode for this object. /// public override int GetHashCode() { return base.GetHashCode(); } ////// Gets a value indicating whether this attribute is set to true by default. /// public override bool IsDefaultAttribute() { return this.Equals(Default); } } }
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- EmptyQuery.cs
- ScriptManagerProxy.cs
- RandomNumberGenerator.cs
- UnsafeNativeMethods.cs
- Currency.cs
- HttpDictionary.cs
- XmlEncApr2001.cs
- ExpressionConverter.cs
- Calendar.cs
- CriticalExceptions.cs
- MarkedHighlightComponent.cs
- PropertyEmitterBase.cs
- DataGridSortCommandEventArgs.cs
- SizeF.cs
- Geometry3D.cs
- Geometry.cs
- AuthorizationRule.cs
- XmlSignatureManifest.cs
- ButtonBaseDesigner.cs
- PasswordTextNavigator.cs
- RoleServiceManager.cs
- MailFileEditor.cs
- UIElement3D.cs
- CacheOutputQuery.cs
- ToolZone.cs
- WCFServiceClientProxyGenerator.cs
- DataGridViewRowHeightInfoPushedEventArgs.cs
- ClientBuildManager.cs
- DecoderFallback.cs
- OutOfMemoryException.cs
- ToolboxItemSnapLineBehavior.cs
- IResourceProvider.cs
- DbConnectionOptions.cs
- AccessDataSourceView.cs
- TextParentUndoUnit.cs
- MetadataCollection.cs
- SafeEventLogWriteHandle.cs
- AssemblyCollection.cs
- FrameworkContentElementAutomationPeer.cs
- CurrentChangingEventManager.cs
- Tag.cs
- TranslateTransform3D.cs
- ListenerPerfCounters.cs
- MetadataItem.cs
- Ray3DHitTestResult.cs
- AssemblyName.cs
- EmbeddedMailObjectsCollection.cs
- XamlParser.cs
- TimeStampChecker.cs
- Point4DValueSerializer.cs
- EventLogEntryCollection.cs
- IdentitySection.cs
- XamlStyleSerializer.cs
- WorkflowTransactionOptions.cs
- XamlHttpHandlerFactory.cs
- IssuedTokenClientCredential.cs
- UInt16.cs
- RegistrationContext.cs
- DllNotFoundException.cs
- Track.cs
- TableItemPattern.cs
- OracleConnection.cs
- ThrowHelper.cs
- DBConnectionString.cs
- Query.cs
- SchemaCollectionCompiler.cs
- PageBuildProvider.cs
- EventEntry.cs
- Console.cs
- BitmapEffectRenderDataResource.cs
- EventLogRecord.cs
- FamilyTypeface.cs
- RSAOAEPKeyExchangeDeformatter.cs
- TraceSwitch.cs
- SqlCacheDependencyDatabaseCollection.cs
- _SingleItemRequestCache.cs
- ExceptionUtil.cs
- TextReader.cs
- ErrorStyle.cs
- RandomNumberGenerator.cs
- CompensationDesigner.cs
- MobileListItem.cs
- HttpProfileGroupBase.cs
- ImplicitInputBrush.cs
- NotifyIcon.cs
- WizardForm.cs
- ActiveXHelper.cs
- LinkConverter.cs
- ToolboxItemFilterAttribute.cs
- CachedFontFamily.cs
- RelAssertionDirectKeyIdentifierClause.cs
- FixedLineResult.cs
- UTF7Encoding.cs
- HttpGetServerProtocol.cs
- RenderData.cs
- securitymgrsite.cs
- WaitForChangedResult.cs
- ConnectionStringSettings.cs
- xmlglyphRunInfo.cs
- ConfigPathUtility.cs