Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / Designer / WebForms / System / Web / UI / Design / WebControls / RegexTypeEditor.cs / 1 / RegexTypeEditor.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI.Design.WebControls { using System.Runtime.InteropServices; 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; using System.Web.UI.Design.Util; ////// /// [System.Security.Permissions.SecurityPermission(System.Security.Permissions.SecurityAction.Demand, Flags=System.Security.Permissions.SecurityPermissionFlag.UnmanagedCode)] public class RegexTypeEditor : UITypeEditor { ///[To be supplied.] ////// /// public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value) { if (provider != null) { IWindowsFormsEditorService edSvc = (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService)); if (edSvc != null) { // Get the site // ISite site = null; if (context.Instance is IComponent) { site = ((IComponent)context.Instance).Site; } else if (context.Instance is object[]) { object [] components = (object []) context.Instance; if (components[0] is IComponent) { site = ((IComponent)components[0]).Site; } } RegexEditorDialog editorDialog = new RegexEditorDialog(site); editorDialog.RegularExpression = value.ToString(); if (editorDialog.ShowDialog() == DialogResult.OK) { value = editorDialog.RegularExpression; } } } return value; } ///[To be supplied.] ////// /// 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.[To be supplied.] ///
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- PathGradientBrush.cs
- FixedSOMTable.cs
- DocumentViewerConstants.cs
- ProviderConnectionPoint.cs
- DateTimeConverter2.cs
- UnauthorizedAccessException.cs
- CompareValidator.cs
- GeneralTransform2DTo3DTo2D.cs
- StorageEntityTypeMapping.cs
- OleDbReferenceCollection.cs
- CharacterShapingProperties.cs
- SyndicationSerializer.cs
- MenuStrip.cs
- EventEntry.cs
- TypeForwardedToAttribute.cs
- WindowAutomationPeer.cs
- QuadraticBezierSegment.cs
- MenuItemCollection.cs
- EncodingStreamWrapper.cs
- Popup.cs
- Blend.cs
- StringReader.cs
- MessagePartDescriptionCollection.cs
- WebRequestModuleElementCollection.cs
- DesignerLoader.cs
- TreeViewImageIndexConverter.cs
- DelegateTypeInfo.cs
- TaskFactory.cs
- InputLanguage.cs
- AddIn.cs
- DesignRelation.cs
- TextElementEnumerator.cs
- BatchParser.cs
- BindingUtils.cs
- DictionaryManager.cs
- Point.cs
- RoutedCommand.cs
- SqlConnectionStringBuilder.cs
- ChannelCacheSettings.cs
- WmlLiteralTextAdapter.cs
- DataContractSet.cs
- ListManagerBindingsCollection.cs
- LockCookie.cs
- RadialGradientBrush.cs
- NullNotAllowedCollection.cs
- AtomContentProperty.cs
- HtmlButton.cs
- RegexCharClass.cs
- IsolatedStorage.cs
- OleDbReferenceCollection.cs
- Floater.cs
- RootBuilder.cs
- EntryPointNotFoundException.cs
- METAHEADER.cs
- CustomExpression.cs
- ParameterElement.cs
- ElasticEase.cs
- ZipIOZip64EndOfCentralDirectoryLocatorBlock.cs
- StructuredTypeEmitter.cs
- HiddenFieldPageStatePersister.cs
- SslStream.cs
- DataDocumentXPathNavigator.cs
- NavigationProgressEventArgs.cs
- ScriptModule.cs
- UniformGrid.cs
- Accessible.cs
- PartialTrustValidationBehavior.cs
- XmlIlTypeHelper.cs
- WorkflowMessageEventHandler.cs
- PasswordBoxAutomationPeer.cs
- EditorPart.cs
- BinaryExpressionHelper.cs
- TextEndOfParagraph.cs
- isolationinterop.cs
- Matrix3DConverter.cs
- OpenFileDialog.cs
- RSAPKCS1KeyExchangeFormatter.cs
- SmtpFailedRecipientException.cs
- OracleRowUpdatedEventArgs.cs
- RangeBaseAutomationPeer.cs
- AttributeSetAction.cs
- WindowsListViewGroup.cs
- CanonicalizationDriver.cs
- AssemblyHash.cs
- ObjectDisposedException.cs
- SymbolDocumentGenerator.cs
- InputElement.cs
- RijndaelManaged.cs
- DbMetaDataCollectionNames.cs
- StateElementCollection.cs
- TypeHelper.cs
- RightsManagementInformation.cs
- DocumentPage.cs
- ShapeTypeface.cs
- SoapObjectWriter.cs
- MachineKeyConverter.cs
- ActivityStatusChangeEventArgs.cs
- XPathDocumentBuilder.cs
- Delegate.cs
- FlowDocumentPage.cs