Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / fx / src / WinForms / Managed / System / WinForms / DataGridViewToolTip.cs / 5 / DataGridViewToolTip.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- using System.Security; using System.Diagnostics; using System.Drawing; using System.Runtime.InteropServices; namespace System.Windows.Forms { public partial class DataGridView { private class DataGridViewToolTip { DataGridView dataGridView = null; ToolTip toolTip = null; private bool toolTipActivated = false; public DataGridViewToolTip(DataGridView dataGridView) { this.dataGridView = dataGridView; } public bool Activated { get { return this.toolTipActivated; } } public ToolTip ToolTip { get { return this.toolTip; } } public void Activate(bool activate) { if (this.dataGridView.DesignMode) { return; } // Create the tool tip handle on demand. if (activate && this.toolTip == null) { this.toolTip = new ToolTip(); this.toolTip.ShowAlways = true; this.toolTip.InitialDelay = 0; this.toolTip.UseFading = false; this.toolTip.UseAnimation = false; this.toolTip.AutoPopDelay = 0; } if (this.dataGridView.IsRestricted) { IntSecurity.AllWindows.Assert(); } try { if (activate) { this.toolTip.Active = true; this.toolTip.Show(this.dataGridView.ToolTipPrivate, this.dataGridView); } else if (this.toolTip != null) { this.toolTip.Hide(this.dataGridView); this.toolTip.Active = false; } } finally { if (this.dataGridView.IsRestricted) { CodeAccessPermission.RevertAssert(); } } this.toolTipActivated = activate; } public void Dispose() { if (this.toolTip != null) { this.toolTip.Dispose(); this.toolTip = null; } } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- using System.Security; using System.Diagnostics; using System.Drawing; using System.Runtime.InteropServices; namespace System.Windows.Forms { public partial class DataGridView { private class DataGridViewToolTip { DataGridView dataGridView = null; ToolTip toolTip = null; private bool toolTipActivated = false; public DataGridViewToolTip(DataGridView dataGridView) { this.dataGridView = dataGridView; } public bool Activated { get { return this.toolTipActivated; } } public ToolTip ToolTip { get { return this.toolTip; } } public void Activate(bool activate) { if (this.dataGridView.DesignMode) { return; } // Create the tool tip handle on demand. if (activate && this.toolTip == null) { this.toolTip = new ToolTip(); this.toolTip.ShowAlways = true; this.toolTip.InitialDelay = 0; this.toolTip.UseFading = false; this.toolTip.UseAnimation = false; this.toolTip.AutoPopDelay = 0; } if (this.dataGridView.IsRestricted) { IntSecurity.AllWindows.Assert(); } try { if (activate) { this.toolTip.Active = true; this.toolTip.Show(this.dataGridView.ToolTipPrivate, this.dataGridView); } else if (this.toolTip != null) { this.toolTip.Hide(this.dataGridView); this.toolTip.Active = false; } } finally { if (this.dataGridView.IsRestricted) { CodeAccessPermission.RevertAssert(); } } this.toolTipActivated = activate; } public void Dispose() { if (this.toolTip != null) { this.toolTip.Dispose(); this.toolTip = null; } } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- LockedAssemblyCache.cs
- ButtonChrome.cs
- WeakReference.cs
- versioninfo.cs
- XsltContext.cs
- Hash.cs
- figurelengthconverter.cs
- XmlSignatureProperties.cs
- ConnectionOrientedTransportChannelFactory.cs
- SeparatorAutomationPeer.cs
- PhonemeConverter.cs
- _CookieModule.cs
- RowParagraph.cs
- FactoryMaker.cs
- Underline.cs
- DBParameter.cs
- WeakHashtable.cs
- TextTreeInsertElementUndoUnit.cs
- InsufficientMemoryException.cs
- SerializationSectionGroup.cs
- OdbcEnvironmentHandle.cs
- ReadOnlyDictionary.cs
- TypeReference.cs
- VectorAnimation.cs
- CriticalFinalizerObject.cs
- SHA384.cs
- Panel.cs
- ToolStripCodeDomSerializer.cs
- TextProviderWrapper.cs
- XmlSerializer.cs
- CreateDataSourceDialog.cs
- Ipv6Element.cs
- ResourceDescriptionAttribute.cs
- VScrollProperties.cs
- MembershipUser.cs
- SocketConnection.cs
- RadialGradientBrush.cs
- DateTimeParse.cs
- TextParagraphCache.cs
- ListView.cs
- SecurityKeyUsage.cs
- StatusBar.cs
- RegexMatchCollection.cs
- BaseParaClient.cs
- SafeCryptHandles.cs
- TableColumn.cs
- TypeDescriptor.cs
- HashMembershipCondition.cs
- HealthMonitoringSection.cs
- DrawingVisual.cs
- DataSourceXmlTextReader.cs
- HttpStreamMessage.cs
- SafeCoTaskMem.cs
- CodeAssignStatement.cs
- MouseCaptureWithinProperty.cs
- CodeFieldReferenceExpression.cs
- Stacktrace.cs
- ComponentCollection.cs
- IIS7UserPrincipal.cs
- MultiByteCodec.cs
- TransformerConfigurationWizardBase.cs
- ConfigurationElementProperty.cs
- CharStorage.cs
- OutgoingWebResponseContext.cs
- DbConnectionPoolIdentity.cs
- ClientFormsIdentity.cs
- InputDevice.cs
- SerializableAttribute.cs
- TableColumn.cs
- PathSegmentCollection.cs
- DataMemberFieldEditor.cs
- XmlSchemaFacet.cs
- XmlSchemaAnnotation.cs
- SystemIPAddressInformation.cs
- UriTemplateEquivalenceComparer.cs
- DependencyPropertyValueSerializer.cs
- EdmItemCollection.cs
- StyleCollection.cs
- DynamicRenderer.cs
- LOSFormatter.cs
- KeyInterop.cs
- X509Certificate2.cs
- errorpatternmatcher.cs
- PropertyPathWorker.cs
- SendSecurityHeaderElement.cs
- DbProviderFactories.cs
- CachedCompositeFamily.cs
- AdjustableArrowCap.cs
- CustomAttributeFormatException.cs
- List.cs
- ServerValidateEventArgs.cs
- InputEventArgs.cs
- FrameworkName.cs
- TextParentUndoUnit.cs
- UInt64Converter.cs
- DataControlFieldsEditor.cs
- HttpHeaderCollection.cs
- HGlobalSafeHandle.cs
- SpecialFolderEnumConverter.cs
- Camera.cs