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
- TranslateTransform.cs
- PrintPreviewControl.cs
- OuterGlowBitmapEffect.cs
- MessageBox.cs
- WebPartConnectVerb.cs
- MouseWheelEventArgs.cs
- NamespaceListProperty.cs
- DesignerValidationSummaryAdapter.cs
- ByteStack.cs
- SchemaElement.cs
- ProtocolsConfigurationEntry.cs
- WebPartRestoreVerb.cs
- DataServiceEntityAttribute.cs
- WebPartDisplayModeCollection.cs
- ComPlusThreadInitializer.cs
- TableCellCollection.cs
- diagnosticsswitches.cs
- LiteralControl.cs
- MasterPageCodeDomTreeGenerator.cs
- OperationCanceledException.cs
- OuterGlowBitmapEffect.cs
- ButtonFieldBase.cs
- precedingsibling.cs
- VisualBasicSettingsHandler.cs
- SchemaManager.cs
- ListDictionaryInternal.cs
- TextProviderWrapper.cs
- XmlHierarchicalEnumerable.cs
- SingleSelectRootGridEntry.cs
- UidManager.cs
- SafeCryptContextHandle.cs
- SecurityTokenTypes.cs
- TableItemPattern.cs
- HtmlTextArea.cs
- FileDetails.cs
- ListBox.cs
- NamespaceInfo.cs
- SqlDataSourceCache.cs
- RelationalExpressions.cs
- Encoding.cs
- ChangeDirector.cs
- StorageRoot.cs
- xmlfixedPageInfo.cs
- BufferedWebEventProvider.cs
- HttpModuleCollection.cs
- PresentationAppDomainManager.cs
- TemplateContent.cs
- ConnectionProviderAttribute.cs
- RegexGroup.cs
- MetadataPropertyAttribute.cs
- DataSourceExpression.cs
- SqlProviderManifest.cs
- OutputScopeManager.cs
- DecimalAnimation.cs
- SafeHandles.cs
- ZipIOLocalFileBlock.cs
- CodeGenerator.cs
- CompilerScopeManager.cs
- BlurEffect.cs
- newinstructionaction.cs
- PolicyValidationException.cs
- AnnouncementEndpoint.cs
- StatusBar.cs
- EntitySetDataBindingList.cs
- XamlTreeBuilderBamlRecordWriter.cs
- FileRecordSequence.cs
- ExpressionEditorAttribute.cs
- MembershipUser.cs
- TableCellCollection.cs
- ControlUtil.cs
- WebSysDisplayNameAttribute.cs
- DomNameTable.cs
- ReaderWriterLock.cs
- HeaderedItemsControl.cs
- ListItemCollection.cs
- DataGridDetailsPresenter.cs
- AppDomainProtocolHandler.cs
- TextServicesCompartmentEventSink.cs
- IdnElement.cs
- UpdatePanelTriggerCollection.cs
- LinkLabelLinkClickedEvent.cs
- ServiceReference.cs
- DataViewSetting.cs
- NonParentingControl.cs
- EndpointPerformanceCounters.cs
- MetafileHeader.cs
- DbDataReader.cs
- CallbackCorrelationInitializer.cs
- TextTreeInsertElementUndoUnit.cs
- WebPartCollection.cs
- TextFindEngine.cs
- SocketAddress.cs
- ScriptManager.cs
- TextOutput.cs
- DispatchChannelSink.cs
- DataTemplate.cs
- FrameAutomationPeer.cs
- ViewgenGatekeeper.cs
- HtmlEmptyTagControlBuilder.cs
- RequiredAttributeAttribute.cs