Code:
/ DotNET / DotNET / 8.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
- ConstructorBuilder.cs
- MouseCaptureWithinProperty.cs
- HttpHandlerActionCollection.cs
- InputMethod.cs
- mediaclock.cs
- objectresult_tresulttype.cs
- WriterOutput.cs
- WorkflowServiceHost.cs
- ResponseBodyWriter.cs
- ManagementObject.cs
- BaseCAMarshaler.cs
- cookiecontainer.cs
- Semaphore.cs
- VariableQuery.cs
- XmlSchemaSubstitutionGroup.cs
- jithelpers.cs
- ScrollChrome.cs
- BindingMemberInfo.cs
- XpsColorContext.cs
- CompleteWizardStep.cs
- NetworkStream.cs
- DelegatedStream.cs
- CustomErrorCollection.cs
- NTAccount.cs
- SystemNetworkInterface.cs
- MarkupProperty.cs
- SHA384Managed.cs
- CompositeKey.cs
- CharacterMetricsDictionary.cs
- CollectionEditorDialog.cs
- FunctionMappingTranslator.cs
- ToolBarButtonClickEvent.cs
- HttpConfigurationContext.cs
- UnsafeNativeMethodsTablet.cs
- DataGridViewCellEventArgs.cs
- ConsumerConnectionPoint.cs
- ScopelessEnumAttribute.cs
- DataGridViewCellConverter.cs
- SimpleTypesSurrogate.cs
- ColorContext.cs
- TextTreeNode.cs
- TextProperties.cs
- ContentPlaceHolder.cs
- RecordManager.cs
- DrawingVisual.cs
- ThreadSafeList.cs
- FrugalList.cs
- ArgumentNullException.cs
- Directory.cs
- ComplexTypeEmitter.cs
- BevelBitmapEffect.cs
- DataGridViewRowCancelEventArgs.cs
- OverlappedAsyncResult.cs
- UpdateProgress.cs
- SystemWebCachingSectionGroup.cs
- ConnectivityStatus.cs
- SqlXmlStorage.cs
- Line.cs
- Path.cs
- sqlstateclientmanager.cs
- InternalBufferOverflowException.cs
- followingsibling.cs
- DeferredSelectedIndexReference.cs
- EntityModelBuildProvider.cs
- XmlValidatingReader.cs
- WebBaseEventKeyComparer.cs
- VectorConverter.cs
- CodeTypeParameter.cs
- Util.cs
- BackgroundFormatInfo.cs
- FixedSOMFixedBlock.cs
- FrugalMap.cs
- MenuBase.cs
- HistoryEventArgs.cs
- RuntimeIdentifierPropertyAttribute.cs
- PointConverter.cs
- BitmapScalingModeValidation.cs
- ServiceDescriptionReflector.cs
- AuthenticationException.cs
- log.cs
- LocalizeDesigner.cs
- BatchWriter.cs
- GridViewSelectEventArgs.cs
- Schema.cs
- ExecutionEngineException.cs
- PointHitTestParameters.cs
- EventLogEntry.cs
- MissingManifestResourceException.cs
- QuaternionRotation3D.cs
- SQLDateTimeStorage.cs
- HitTestParameters3D.cs
- SecurityIdentifierElementCollection.cs
- Floater.cs
- CodeCatchClauseCollection.cs
- NeutralResourcesLanguageAttribute.cs
- XmlDataProvider.cs
- Group.cs
- CodeDomConfigurationHandler.cs
- Composition.cs
- __ConsoleStream.cs