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
- WindowsGraphicsCacheManager.cs
- ReturnEventArgs.cs
- BaseValidator.cs
- D3DImage.cs
- HttpCacheParams.cs
- ReliableChannelBinder.cs
- CallbackValidatorAttribute.cs
- TypeDependencyAttribute.cs
- SharedPerformanceCounter.cs
- RegistryKey.cs
- CacheAxisQuery.cs
- InboundActivityHelper.cs
- DataGridViewCellStyleConverter.cs
- SoapAttributeAttribute.cs
- AutoFocusStyle.xaml.cs
- ToolStripGripRenderEventArgs.cs
- RankException.cs
- SourceFileInfo.cs
- WebScriptMetadataMessage.cs
- RenameRuleObjectDialog.Designer.cs
- TypeListConverter.cs
- LocalTransaction.cs
- SetterBaseCollection.cs
- TdsEnums.cs
- InnerItemCollectionView.cs
- NotCondition.cs
- TokenDescriptor.cs
- PermissionRequestEvidence.cs
- XPathDocumentIterator.cs
- DataGridColumn.cs
- ReliabilityContractAttribute.cs
- IfJoinedCondition.cs
- Trigger.cs
- WsatProxy.cs
- _OSSOCK.cs
- FreezableDefaultValueFactory.cs
- SvcFileManager.cs
- SafeViewOfFileHandle.cs
- EntitySqlQueryBuilder.cs
- HMACSHA512.cs
- __ComObject.cs
- DataGridParentRows.cs
- AppendHelper.cs
- LassoHelper.cs
- TreeViewCancelEvent.cs
- XslException.cs
- RelationshipEnd.cs
- WebEvents.cs
- DesignerActionList.cs
- RTTypeWrapper.cs
- CallContext.cs
- TriggerActionCollection.cs
- XPathSingletonIterator.cs
- ChineseLunisolarCalendar.cs
- ReliabilityContractAttribute.cs
- ToolStripSplitStackLayout.cs
- ResourceLoader.cs
- EventTrigger.cs
- HttpListenerPrefixCollection.cs
- ToolStripSystemRenderer.cs
- RpcAsyncResult.cs
- ScrollProperties.cs
- ThumbButtonInfoCollection.cs
- Drawing.cs
- CheckPair.cs
- RangeValuePatternIdentifiers.cs
- StatusBar.cs
- ProjectedSlot.cs
- PeerChannelFactory.cs
- TypeToken.cs
- RefreshEventArgs.cs
- SymbolEqualComparer.cs
- BidPrivateBase.cs
- EntityReference.cs
- Underline.cs
- XmlSchemaInfo.cs
- UniqueID.cs
- ChannelParameterCollection.cs
- TraversalRequest.cs
- SafeCloseHandleCritical.cs
- MobileListItem.cs
- LocalServiceSecuritySettingsElement.cs
- BuildDependencySet.cs
- IndexedWhereQueryOperator.cs
- ColumnPropertiesGroup.cs
- UserControlParser.cs
- TransportConfigurationTypeElementCollection.cs
- ChildTable.cs
- DataGridViewSelectedCellsAccessibleObject.cs
- GenericAuthenticationEventArgs.cs
- OleDbConnectionInternal.cs
- HwndSourceKeyboardInputSite.cs
- WizardForm.cs
- HttpResponse.cs
- DictionaryBase.cs
- TextSpanModifier.cs
- HtmlTableCell.cs
- FileDataSourceCache.cs
- sortedlist.cs
- CharacterBuffer.cs