Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / WinForms / Managed / System / WinForms / SpecialFolderEnumConverter.cs / 1305376 / SpecialFolderEnumConverter.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Windows.Forms { using System; using System.ComponentModel; using System.Collections; internal class SpecialFolderEnumConverter : AlphaSortedEnumConverter { public SpecialFolderEnumConverter(Type type) : base(type) { } ////// See VSWhidbey #376570. Personal appears twice in type editor because its numeric value matches with MyDocuments. /// This code filters out the duplicate value. public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context) { StandardValuesCollection values = base.GetStandardValues(context); ArrayList list = new ArrayList(); int count = values.Count; bool personalSeen = false; for (int i = 0; i < count; i++) { if (values[i] is System.Environment.SpecialFolder && values[i].Equals(System.Environment.SpecialFolder.Personal)) { if (!personalSeen) { personalSeen = true; list.Add(values[i]); } } else { list.Add(values[i]); } } return new StandardValuesCollection(list); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
![Network programming in C#, Network Programming in VB.NET, Network Programming in .NET](/images/book.jpg)
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- EntityDataSourceSelectedEventArgs.cs
- Path.cs
- InvokeDelegate.cs
- EncodingFallbackAwareXmlTextWriter.cs
- WebBrowsableAttribute.cs
- NameHandler.cs
- ContentFileHelper.cs
- LabelAutomationPeer.cs
- NativeMethods.cs
- ComponentDispatcherThread.cs
- FontCacheUtil.cs
- MD5.cs
- Sentence.cs
- RelationshipWrapper.cs
- safemediahandle.cs
- HtmlTitle.cs
- CodeVariableDeclarationStatement.cs
- ExpandCollapseProviderWrapper.cs
- SpellCheck.cs
- Line.cs
- Rect3DValueSerializer.cs
- PersonalizationState.cs
- XPathDescendantIterator.cs
- UserPersonalizationStateInfo.cs
- TemplateAction.cs
- FormatException.cs
- Accessible.cs
- HashMembershipCondition.cs
- SoapExtensionStream.cs
- StatusBarPanelClickEvent.cs
- IsolatedStoragePermission.cs
- RegionInfo.cs
- QilInvokeLateBound.cs
- OleDbRowUpdatedEvent.cs
- SpellerStatusTable.cs
- RoleManagerEventArgs.cs
- DefaultSerializationProviderAttribute.cs
- MenuItemBinding.cs
- CookieProtection.cs
- PeerFlooder.cs
- DateTimeConverter.cs
- Viewport2DVisual3D.cs
- AstTree.cs
- ProfileSettings.cs
- FixedHighlight.cs
- HtmlMeta.cs
- RegionData.cs
- TextFormatter.cs
- EventMappingSettingsCollection.cs
- ManagedWndProcTracker.cs
- CompModHelpers.cs
- RegexRunnerFactory.cs
- SingleConverter.cs
- ExceptionList.cs
- CodeCatchClauseCollection.cs
- QilLoop.cs
- PropertyValueEditor.cs
- RedBlackList.cs
- FileAuthorizationModule.cs
- DataListItemEventArgs.cs
- DiscoveryClientRequestChannel.cs
- WrappedReader.cs
- Encoder.cs
- EncoderParameters.cs
- ProcessHostServerConfig.cs
- SmtpDigestAuthenticationModule.cs
- PointCollectionConverter.cs
- HuffCodec.cs
- ConstNode.cs
- SecuritySessionSecurityTokenAuthenticator.cs
- StackSpiller.Temps.cs
- FactoryRecord.cs
- DetailsViewDeleteEventArgs.cs
- BrushConverter.cs
- CacheVirtualItemsEvent.cs
- OdbcConnectionOpen.cs
- X509CertificateTrustedIssuerElementCollection.cs
- PropertyPath.cs
- SHA512CryptoServiceProvider.cs
- AssemblyCache.cs
- DataException.cs
- DataGridViewAutoSizeModeEventArgs.cs
- HandledMouseEvent.cs
- CheckBox.cs
- LocationReference.cs
- PropertyInfoSet.cs
- XPathNodeList.cs
- XmlCharCheckingWriter.cs
- IBuiltInEvidence.cs
- ExpressionBindingsDialog.cs
- MessagePropertyFilter.cs
- DynamicFilterExpression.cs
- XamlDebuggerXmlReader.cs
- HandleCollector.cs
- TableLayout.cs
- Vector3DCollection.cs
- CharacterBufferReference.cs
- PersonalizationEntry.cs
- GridViewActionList.cs
- ContentDesigner.cs