Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / WinForms / Managed / System / WinForms / DataGridViewToolTip.cs / 1305376 / 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
- ScriptModule.cs
- HttpModuleActionCollection.cs
- XmlSchemaSimpleTypeList.cs
- KerberosRequestorSecurityTokenAuthenticator.cs
- NotConverter.cs
- DataObjectPastingEventArgs.cs
- CombinedHttpChannel.cs
- PartManifestEntry.cs
- _SecureChannel.cs
- VisualTransition.cs
- FactoryId.cs
- GroupDescription.cs
- CodeCompiler.cs
- LogicalExpr.cs
- ThicknessAnimationBase.cs
- QilDataSource.cs
- PerfCounterSection.cs
- SyndicationDeserializer.cs
- Stopwatch.cs
- SettingsProperty.cs
- SqlBooleanizer.cs
- MsmqTransportSecurity.cs
- InteropExecutor.cs
- DataGridViewCellErrorTextNeededEventArgs.cs
- UIElementCollection.cs
- StoreItemCollection.cs
- validationstate.cs
- DataGridCaption.cs
- DesignerSerializerAttribute.cs
- ProfileService.cs
- TablePattern.cs
- DataGridSortCommandEventArgs.cs
- WebControlParameterProxy.cs
- SortableBindingList.cs
- WebConfigurationHostFileChange.cs
- StateMachineSubscription.cs
- CFStream.cs
- RenamedEventArgs.cs
- MembershipUser.cs
- SystemInformation.cs
- SystemFonts.cs
- parserscommon.cs
- SelectionPatternIdentifiers.cs
- Vector3DConverter.cs
- SiteOfOriginPart.cs
- LoginName.cs
- SQLBoolean.cs
- TeredoHelper.cs
- OLEDB_Enum.cs
- VideoDrawing.cs
- GreenMethods.cs
- MappingMetadataHelper.cs
- WebPartConnectVerb.cs
- FontFaceLayoutInfo.cs
- UriTemplateTable.cs
- AuthenticationModulesSection.cs
- CfgParser.cs
- PropertyNames.cs
- PromptEventArgs.cs
- BindingSource.cs
- IntSecurity.cs
- HtmlControl.cs
- documentsequencetextcontainer.cs
- TemplateParser.cs
- XmlHierarchyData.cs
- SqlDelegatedTransaction.cs
- CodePageUtils.cs
- PhoneCallDesigner.cs
- Context.cs
- HttpApplicationFactory.cs
- RepeaterCommandEventArgs.cs
- DataServiceEntityAttribute.cs
- BulletChrome.cs
- Atom10FormatterFactory.cs
- MainMenu.cs
- StylusPlugInCollection.cs
- EdmConstants.cs
- Graphics.cs
- LocalizationCodeDomSerializer.cs
- EqualityArray.cs
- DocumentOrderComparer.cs
- TcpConnectionPoolSettingsElement.cs
- WebPartVerb.cs
- WpfPayload.cs
- LineMetrics.cs
- ACL.cs
- TransactionScope.cs
- ToolStripEditorManager.cs
- PropertyAccessVisitor.cs
- TimeSpan.cs
- BitmapDecoder.cs
- MulticastDelegate.cs
- SelectionEditingBehavior.cs
- PropertyIDSet.cs
- FixedDocumentPaginator.cs
- ReadOnlyHierarchicalDataSourceView.cs
- ListenDesigner.cs
- TranslateTransform3D.cs
- XDeferredAxisSource.cs