Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / Designer / WebForms / System / Web / UI / Design / URLEditor.cs / 1 / URLEditor.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI.Design { using System.Runtime.InteropServices; using System.Design; using System.Diagnostics; using System; using System.IO; using System.Collections; using System.ComponentModel; using System.Windows.Forms; using System.Drawing; using System.Drawing.Design; using System.Windows.Forms.Design; using System.Windows.Forms.ComponentModel; ////// /// [System.Security.Permissions.SecurityPermission(System.Security.Permissions.SecurityAction.Demand, Flags=System.Security.Permissions.SecurityPermissionFlag.UnmanagedCode)] public class UrlEditor : UITypeEditor { ///Provides an editor for visually picking an Url. ////// /// protected virtual string Caption { get { return SR.GetString(SR.UrlPicker_DefaultCaption); } } ////// Gets or sets the caption for the Url. /// ////// /// protected virtual UrlBuilderOptions Options { get { return UrlBuilderOptions.None; } } ////// Gets or sets the options for the Url picker. /// ////// /// public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value) { if (provider != null) { IWindowsFormsEditorService edSvc = (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService)); if (edSvc != null) { string url = (string) value; string caption = Caption; string filter = Filter; url = UrlBuilder.BuildUrl(provider, null, url, caption, filter, Options); if (url != null) { value = url; } } } return value; } ////// Edits the specified object value using /// the editor style provided by GetEditorStyle. /// ////// /// protected virtual string Filter { get { return SR.GetString(SR.UrlPicker_DefaultFilter); } } ////// Gets or sets the filter to use. /// ////// /// public override UITypeEditorEditStyle GetEditStyle(ITypeDescriptorContext context) { return UITypeEditorEditStyle.Modal; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved./// Gets the editing style of the Edit method. /// ///
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ListCollectionView.cs
- XomlDesignerLoader.cs
- TraceSection.cs
- DBPropSet.cs
- PenThread.cs
- Win32SafeHandles.cs
- GenerateScriptTypeAttribute.cs
- DefaultEvaluationContext.cs
- ResourceDescriptionAttribute.cs
- FlowDocument.cs
- UrlPropertyAttribute.cs
- TextSelectionProcessor.cs
- AssociationSet.cs
- CompressEmulationStream.cs
- DocComment.cs
- QueryCacheManager.cs
- UriWriter.cs
- SafeArrayTypeMismatchException.cs
- SqlDeflator.cs
- SerializationUtility.cs
- TemplateBuilder.cs
- NativeDirectoryServicesQueryAPIs.cs
- GPPOINTF.cs
- WindowsGraphics.cs
- AmbientLight.cs
- CompilationLock.cs
- SecurityState.cs
- ExtensionDataObject.cs
- TextFormatterHost.cs
- IdentityValidationException.cs
- PagerSettings.cs
- UnmanagedHandle.cs
- SQLConvert.cs
- InputLanguageSource.cs
- Canvas.cs
- SQLUtility.cs
- DataTemplate.cs
- CollectionDataContract.cs
- InsufficientMemoryException.cs
- DBDataPermission.cs
- SmiEventSink.cs
- TypeUtil.cs
- TimeZone.cs
- SqlDataReaderSmi.cs
- CodeTypeReference.cs
- RectangleGeometry.cs
- ReferenceConverter.cs
- MILUtilities.cs
- IgnoreSectionHandler.cs
- DataBoundLiteralControl.cs
- DescendentsWalker.cs
- RemoveStoryboard.cs
- TryExpression.cs
- DBSqlParserTable.cs
- _emptywebproxy.cs
- DataSourceListEditor.cs
- CachedFontFamily.cs
- DeclarativeCatalogPartDesigner.cs
- HtmlTextArea.cs
- ArrangedElementCollection.cs
- ObjectContext.cs
- ExtensibleClassFactory.cs
- FilteredAttributeCollection.cs
- WebControlParameterProxy.cs
- WmpBitmapEncoder.cs
- Polygon.cs
- LiteralSubsegment.cs
- ZoneLinkButton.cs
- SplitContainer.cs
- ProxyRpc.cs
- XmlDomTextWriter.cs
- ByteFacetDescriptionElement.cs
- EntityCollection.cs
- HelpInfo.cs
- ObjectAssociationEndMapping.cs
- TranslateTransform.cs
- WindowsFormsLinkLabel.cs
- PathGeometry.cs
- ReferencedCollectionType.cs
- DocumentViewerBaseAutomationPeer.cs
- DoubleLink.cs
- EntityDataSourceChangingEventArgs.cs
- ThrowHelper.cs
- Clock.cs
- EditorPartCollection.cs
- PersonalizationAdministration.cs
- _Semaphore.cs
- GridViewRowCollection.cs
- Property.cs
- GrammarBuilderDictation.cs
- ContentValidator.cs
- SByteStorage.cs
- DataAdapter.cs
- HeaderUtility.cs
- RedistVersionInfo.cs
- XPathAxisIterator.cs
- DescendantOverDescendantQuery.cs
- StructureChangedEventArgs.cs
- XPathBinder.cs
- InstalledFontCollection.cs