Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / fx / src / CommonUI / System / Drawing / Design / UITypeEditor.cs / 1 / UITypeEditor.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* */ namespace System.Drawing.Design { using System.Runtime.InteropServices; using System.ComponentModel; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Collections; using Microsoft.Win32; using System.ComponentModel.Design; using System.Drawing; using System.Collections.Generic; using System.Collections.ObjectModel; ////// /// [System.Security.Permissions.PermissionSetAttribute(System.Security.Permissions.SecurityAction.InheritanceDemand, Name="FullTrust")] [System.Security.Permissions.PermissionSetAttribute(System.Security.Permissions.SecurityAction.LinkDemand, Name="FullTrust")] public class UITypeEditor { ///Provides a base class for editors /// that may provide users with a user interface to visually edit /// the values of the supported type or types. ////// /// In this static constructor we provide default UITypeEditors to /// the TypeDescriptor. /// static UITypeEditor() { Hashtable intrinsicEditors = new Hashtable(); // Our set of intrinsic editors. intrinsicEditors[typeof(DateTime)] = "System.ComponentModel.Design.DateTimeEditor, " + AssemblyRef.SystemDesign; intrinsicEditors[typeof(Array)] = "System.ComponentModel.Design.ArrayEditor, " + AssemblyRef.SystemDesign; intrinsicEditors[typeof(IList)] = "System.ComponentModel.Design.CollectionEditor, " + AssemblyRef.SystemDesign; intrinsicEditors[typeof(ICollection)] = "System.ComponentModel.Design.CollectionEditor, " + AssemblyRef.SystemDesign; intrinsicEditors[typeof(byte[])] = "System.ComponentModel.Design.BinaryEditor, " + AssemblyRef.SystemDesign; intrinsicEditors[typeof(System.IO.Stream)] = "System.ComponentModel.Design.BinaryEditor, " + AssemblyRef.SystemDesign; intrinsicEditors[typeof(string[])] = "System.Windows.Forms.Design.StringArrayEditor, " + AssemblyRef.SystemDesign; intrinsicEditors[typeof(Collection)] = "System.Windows.Forms.Design.StringCollectionEditor, " + AssemblyRef.SystemDesign; // Add our intrinsic editors to TypeDescriptor. // TypeDescriptor.AddEditorTable(typeof(UITypeEditor), intrinsicEditors); } /// /// /// public UITypeEditor() { } ////// Initializes /// a new instance of the ///class. /// /// /// public virtual bool IsDropDownResizable { get { return false; } } ////// Determines if drop-down editors should be resizable by the user. /// ////// /// public object EditValue(IServiceProvider provider, object value) { return EditValue(null, provider, value); } ///Edits the specified value using the editor style /// provided by ///. /// /// public virtual object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value) { return value; } ///Edits the specified object's value using the editor style /// provided by ///. /// /// public UITypeEditorEditStyle GetEditStyle() { return GetEditStyle(null); } ////// Gets the ////// of the Edit method. /// /// /// public bool GetPaintValueSupported() { return GetPaintValueSupported(null); } ///Gets a value indicating whether this editor supports painting a representation /// of an object's value. ////// /// public virtual bool GetPaintValueSupported(ITypeDescriptorContext context) { return false; } ///Gets a value indicating whether the specified context supports painting a representation /// of an object's value. ////// /// public virtual UITypeEditorEditStyle GetEditStyle(ITypeDescriptorContext context) { return UITypeEditorEditStyle.None; } ////// Gets the editing style of the Edit method. /// ////// /// public void PaintValue(object value, Graphics canvas, Rectangle rectangle) { PaintValue(new PaintValueEventArgs(null, value, canvas, rectangle)); } ///Paints a representative value of the specified object to the /// specified canvas. ////// /// [SuppressMessage("Microsoft.Security", "CA2109:ReviewVisibleEventHandlers")] public virtual void PaintValue(PaintValueEventArgs e) { } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //Paints a representative value of the specified object to the /// provided canvas. ///// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* */ namespace System.Drawing.Design { using System.Runtime.InteropServices; using System.ComponentModel; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Collections; using Microsoft.Win32; using System.ComponentModel.Design; using System.Drawing; using System.Collections.Generic; using System.Collections.ObjectModel; ////// /// [System.Security.Permissions.PermissionSetAttribute(System.Security.Permissions.SecurityAction.InheritanceDemand, Name="FullTrust")] [System.Security.Permissions.PermissionSetAttribute(System.Security.Permissions.SecurityAction.LinkDemand, Name="FullTrust")] public class UITypeEditor { ///Provides a base class for editors /// that may provide users with a user interface to visually edit /// the values of the supported type or types. ////// /// In this static constructor we provide default UITypeEditors to /// the TypeDescriptor. /// static UITypeEditor() { Hashtable intrinsicEditors = new Hashtable(); // Our set of intrinsic editors. intrinsicEditors[typeof(DateTime)] = "System.ComponentModel.Design.DateTimeEditor, " + AssemblyRef.SystemDesign; intrinsicEditors[typeof(Array)] = "System.ComponentModel.Design.ArrayEditor, " + AssemblyRef.SystemDesign; intrinsicEditors[typeof(IList)] = "System.ComponentModel.Design.CollectionEditor, " + AssemblyRef.SystemDesign; intrinsicEditors[typeof(ICollection)] = "System.ComponentModel.Design.CollectionEditor, " + AssemblyRef.SystemDesign; intrinsicEditors[typeof(byte[])] = "System.ComponentModel.Design.BinaryEditor, " + AssemblyRef.SystemDesign; intrinsicEditors[typeof(System.IO.Stream)] = "System.ComponentModel.Design.BinaryEditor, " + AssemblyRef.SystemDesign; intrinsicEditors[typeof(string[])] = "System.Windows.Forms.Design.StringArrayEditor, " + AssemblyRef.SystemDesign; intrinsicEditors[typeof(Collection)] = "System.Windows.Forms.Design.StringCollectionEditor, " + AssemblyRef.SystemDesign; // Add our intrinsic editors to TypeDescriptor. // TypeDescriptor.AddEditorTable(typeof(UITypeEditor), intrinsicEditors); } /// /// /// public UITypeEditor() { } ////// Initializes /// a new instance of the ///class. /// /// /// public virtual bool IsDropDownResizable { get { return false; } } ////// Determines if drop-down editors should be resizable by the user. /// ////// /// public object EditValue(IServiceProvider provider, object value) { return EditValue(null, provider, value); } ///Edits the specified value using the editor style /// provided by ///. /// /// public virtual object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value) { return value; } ///Edits the specified object's value using the editor style /// provided by ///. /// /// public UITypeEditorEditStyle GetEditStyle() { return GetEditStyle(null); } ////// Gets the ////// of the Edit method. /// /// /// public bool GetPaintValueSupported() { return GetPaintValueSupported(null); } ///Gets a value indicating whether this editor supports painting a representation /// of an object's value. ////// /// public virtual bool GetPaintValueSupported(ITypeDescriptorContext context) { return false; } ///Gets a value indicating whether the specified context supports painting a representation /// of an object's value. ////// /// public virtual UITypeEditorEditStyle GetEditStyle(ITypeDescriptorContext context) { return UITypeEditorEditStyle.None; } ////// Gets the editing style of the Edit method. /// ////// /// public void PaintValue(object value, Graphics canvas, Rectangle rectangle) { PaintValue(new PaintValueEventArgs(null, value, canvas, rectangle)); } ///Paints a representative value of the specified object to the /// specified canvas. ////// /// [SuppressMessage("Microsoft.Security", "CA2109:ReviewVisibleEventHandlers")] public virtual void PaintValue(PaintValueEventArgs e) { } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.Paints a representative value of the specified object to the /// provided canvas. ///
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- KerberosSecurityTokenProvider.cs
- Hash.cs
- RemotingException.cs
- SqlStatistics.cs
- XmlComplianceUtil.cs
- ToolStripDropDownItemDesigner.cs
- EntityDataSourceStatementEditorForm.cs
- KnownColorTable.cs
- HttpTransportSecurityElement.cs
- ping.cs
- PrintPreviewDialog.cs
- WhitespaceRuleLookup.cs
- QuestionEventArgs.cs
- Model3D.cs
- NetworkCredential.cs
- XmlBinaryReaderSession.cs
- EntityDesignerUtils.cs
- SlipBehavior.cs
- BooleanToSelectiveScrollingOrientationConverter.cs
- ObjectDataSource.cs
- EditorPart.cs
- GridViewRowEventArgs.cs
- AdornerPresentationContext.cs
- XmlValidatingReader.cs
- CssTextWriter.cs
- FileAuthorizationModule.cs
- ReadOnlyTernaryTree.cs
- MatrixTransform3D.cs
- SmtpNetworkElement.cs
- DataViewManager.cs
- ListItem.cs
- PartialCachingControl.cs
- WebServiceFault.cs
- NativeMethods.cs
- DataGridViewAutoSizeModeEventArgs.cs
- GeneratedContractType.cs
- DateTimeOffset.cs
- TimeSpanStorage.cs
- SQLInt32Storage.cs
- DataViewManager.cs
- SpecialTypeDataContract.cs
- LayoutTableCell.cs
- WindowsIPAddress.cs
- BinaryObjectWriter.cs
- FormsAuthenticationUser.cs
- HealthMonitoringSectionHelper.cs
- WindowsScrollBar.cs
- MenuItemCollection.cs
- DesignerSelectionListAdapter.cs
- VoiceChangeEventArgs.cs
- ContextMenuService.cs
- CodeCompileUnit.cs
- CodeIterationStatement.cs
- WorkflowApplication.cs
- XmlReaderSettings.cs
- HelpPage.cs
- TimeBoundedCache.cs
- ConfigurationLoaderException.cs
- CreateInstanceBinder.cs
- ToolboxItemAttribute.cs
- TemplateAction.cs
- TextTreeExtractElementUndoUnit.cs
- WindowsListViewSubItem.cs
- ObjectSet.cs
- SignedXml.cs
- OperandQuery.cs
- XmlDataLoader.cs
- BaseAutoFormat.cs
- StrongNameUtility.cs
- OdbcStatementHandle.cs
- TranslateTransform3D.cs
- NativeMethodsCLR.cs
- SafeUserTokenHandle.cs
- ServiceOperation.cs
- FormsAuthenticationCredentials.cs
- SoapExtensionStream.cs
- OrderedDictionaryStateHelper.cs
- remotingproxy.cs
- WsiProfilesElement.cs
- CheckStoreFileValidityRequest.cs
- PointCollection.cs
- UriWriter.cs
- ScriptControlDescriptor.cs
- ConfigurationUtility.cs
- DesignerDataStoredProcedure.cs
- TileBrush.cs
- HttpListenerRequest.cs
- StandardRuntimeEnumValidator.cs
- PersonalizablePropertyEntry.cs
- DataGridTable.cs
- UIElementCollection.cs
- InputDevice.cs
- EntityProviderServices.cs
- WebContext.cs
- DataServiceBuildProvider.cs
- ForeignKeyConstraint.cs
- FormatSettings.cs
- activationcontext.cs
- TypefaceMap.cs
- MultiSelectRootGridEntry.cs