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
- MessageBox.cs
- StringArrayConverter.cs
- HttpInputStream.cs
- AutomationElementCollection.cs
- MimeTypeMapper.cs
- GlyphShapingProperties.cs
- LineServicesCallbacks.cs
- NamedPipeActivation.cs
- FontStyle.cs
- MetadataException.cs
- datacache.cs
- Fonts.cs
- ReliabilityContractAttribute.cs
- XmlComment.cs
- XmlReaderSettings.cs
- PageContentAsyncResult.cs
- SortQuery.cs
- Convert.cs
- DataSourceCacheDurationConverter.cs
- Msmq3PoisonHandler.cs
- ActivityStatusChangeEventArgs.cs
- DbConnectionPoolOptions.cs
- CategoryGridEntry.cs
- InfoCardRSAPKCS1KeyExchangeDeformatter.cs
- MimeMapping.cs
- URLAttribute.cs
- RelationshipEntry.cs
- RegexFCD.cs
- PTProvider.cs
- _BufferOffsetSize.cs
- TextEditorTables.cs
- CompositeFontInfo.cs
- ValueTypeFixupInfo.cs
- WorkflowInlining.cs
- ArgumentDirectionHelper.cs
- GridViewUpdateEventArgs.cs
- PresentationSource.cs
- DocumentPageViewAutomationPeer.cs
- ScriptBehaviorDescriptor.cs
- SqlRecordBuffer.cs
- MessageQueueConverter.cs
- ToolStripProfessionalLowResolutionRenderer.cs
- DataGridViewCellValueEventArgs.cs
- InstanceCreationEditor.cs
- SafeFileHandle.cs
- SHA384.cs
- BackStopAuthenticationModule.cs
- HwndSource.cs
- DateTimeFormatInfo.cs
- TransformCryptoHandle.cs
- SqlFactory.cs
- Brush.cs
- IArgumentProvider.cs
- NegotiateStream.cs
- SafeFreeMibTable.cs
- XmlHelper.cs
- HMACSHA256.cs
- XamlTreeBuilder.cs
- DataGridRow.cs
- SafeNativeMethods.cs
- DataGridRow.cs
- Exception.cs
- GlyphRunDrawing.cs
- TextDecorationCollection.cs
- AliasedSlot.cs
- LifetimeServices.cs
- ClientSettingsProvider.cs
- SqlNode.cs
- DispatcherFrame.cs
- CacheDependency.cs
- CompositeDuplexBindingElement.cs
- CalendarDateChangedEventArgs.cs
- TableLayout.cs
- DesignerView.xaml.cs
- StrokeNodeOperations2.cs
- _StreamFramer.cs
- MimeImporter.cs
- SecurityRuntime.cs
- Mouse.cs
- ControllableStoryboardAction.cs
- DateTimeConverter.cs
- HMACRIPEMD160.cs
- NumberSubstitution.cs
- CellLabel.cs
- HostedHttpRequestAsyncResult.cs
- Int32CAMarshaler.cs
- ConsoleKeyInfo.cs
- ToolStripLabel.cs
- DaylightTime.cs
- ObjectItemCollection.cs
- CapabilitiesState.cs
- StandardToolWindows.cs
- CollectionViewProxy.cs
- MasterPage.cs
- ObjectDataSource.cs
- Inflater.cs
- RawStylusInputCustomData.cs
- CurrencyManager.cs
- CodeObjectCreateExpression.cs
- AuthorizationRuleCollection.cs