protected override void OnHelpRequested(HelpEventArgs hevent) { // Get the active control Control activeControl = HelpUtils.GetActiveControl(this); // Figure out the context DataConnectionDialogContext context = DataConnectionDialogContext.AddProperty; if (activeControl == propertyTextBox) { context = DataConnectionDialogContext.AddPropertyTextBox; } if (activeControl == okButton) { context = DataConnectionDialogContext.AddPropertyOkButton; } if (activeControl == cancelButton) { context = DataConnectionDialogContext.AddPropertyCancelButton; } // Call OnContextHelpRequested ContextHelpEventArgs e = new ContextHelpEventArgs(context, hevent.MousePos); _mainDialog.OnContextHelpRequested(e); hevent.Handled = e.Handled; if (!e.Handled) { base.OnHelpRequested(hevent); } }
protected override void OnHelpRequested(HelpEventArgs hevent) { // Get the active control Control activeControl = this; ContainerControl containerControl = null; while ((containerControl = activeControl as ContainerControl) != null && containerControl != propertyGrid && containerControl.ActiveControl != null) { activeControl = containerControl.ActiveControl; } // Figure out the context DataConnectionDialogContext context = DataConnectionDialogContext.Advanced; if (activeControl == propertyGrid) { context = DataConnectionDialogContext.AdvancedPropertyGrid; } if (activeControl == textBox) { context = DataConnectionDialogContext.AdvancedTextBox; } if (activeControl == okButton) { context = DataConnectionDialogContext.AdvancedOkButton; } if (activeControl == cancelButton) { context = DataConnectionDialogContext.AdvancedCancelButton; } // Call OnContextHelpRequested ContextHelpEventArgs e = new ContextHelpEventArgs(context, hevent.MousePos); _mainDialog.OnContextHelpRequested(e); hevent.Handled = e.Handled; if (!e.Handled) { base.OnHelpRequested(hevent); } }
protected override void OnHelpRequested(HelpEventArgs hevent) { // Get the active control Control activeControl = HelpUtils.GetActiveControl(this); // Figure out the context DataConnectionDialogContext context = DataConnectionDialogContext.Source; if (activeControl == dataSourceListBox) { context = DataConnectionDialogContext.SourceListBox; } if (activeControl == dataProviderComboBox) { context = DataConnectionDialogContext.SourceProviderComboBox; } if (activeControl == okButton) { context = DataConnectionDialogContext.SourceOkButton; } if (activeControl == cancelButton) { context = DataConnectionDialogContext.SourceCancelButton; } // Call OnContextHelpRequested ContextHelpEventArgs e = new ContextHelpEventArgs(context, hevent.MousePos); _mainDialog.OnContextHelpRequested(e); hevent.Handled = e.Handled; if (!e.Handled) { base.OnHelpRequested(hevent); } }