本文整理汇总了C#中System.Windows.Forms.HelpEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# HelpEventArgs类的具体用法?C# HelpEventArgs怎么用?C# HelpEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
HelpEventArgs类属于System.Windows.Forms命名空间,在下文中一共展示了HelpEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnHelpRequested
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);
}
}
示例2: Catch_HelpRequested
public void Catch_HelpRequested(object sender, HelpEventArgs hlpevent)
{
string message;
if (_listeMessage.TryGetValue(sender, out message))
{
helpToolTip.Show(message, sender as IWin32Window);
}
}
示例3: ControlHelpRequested
private void ControlHelpRequested(object sender, HelpEventArgs helpEvent)
{
if (!SupressHelpRequests && !string.IsNullOrEmpty(Url))
{
helpEvent.Handled = true;
OpenUrl();
}
}
示例4: View_HelpRequested
/// <summary>
/// Dit is de eventhandler voor het functioneren van de tooltips.
/// </summary>
/// <param name="sender">Het UI element waarover help wordt opgevraagt.</param>
/// <param name="hlpevent"></param>
public void View_HelpRequested(object sender, HelpEventArgs hlpevent)
{
Control requestingControl = (Control)sender;
this.tooltip.ToolTipIcon = ToolTipIcon.Info;
this.tooltip.ToolTipTitle = requestingControl.Text;
this.tooltip.UseAnimation = true;
this.tooltip.Show(requestingControl.Tag.ToString(), requestingControl, 5000);
hlpevent.Handled = true;
}
示例5: OnHelpRequested
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);
}
}
示例6: OnControlHelp
private void OnControlHelp(object sender, HelpEventArgs hevent)
{
Control ctl = (Control) sender;
string helpString = this.GetHelpString(ctl);
string helpKeyword = this.GetHelpKeyword(ctl);
HelpNavigator helpNavigator = this.GetHelpNavigator(ctl);
if (this.GetShowHelp(ctl))
{
if (((Control.MouseButtons != MouseButtons.None) && (helpString != null)) && (helpString.Length > 0))
{
Help.ShowPopup(ctl, helpString, hevent.MousePos);
hevent.Handled = true;
}
if (!hevent.Handled && (this.helpNamespace != null))
{
if ((helpKeyword != null) && (helpKeyword.Length > 0))
{
Help.ShowHelp(ctl, this.helpNamespace, helpNavigator, helpKeyword);
hevent.Handled = true;
}
if (!hevent.Handled)
{
Help.ShowHelp(ctl, this.helpNamespace, helpNavigator);
hevent.Handled = true;
}
}
if ((!hevent.Handled && (helpString != null)) && (helpString.Length > 0))
{
Help.ShowPopup(ctl, helpString, hevent.MousePos);
hevent.Handled = true;
}
if (!hevent.Handled && (this.helpNamespace != null))
{
Help.ShowHelp(ctl, this.helpNamespace);
hevent.Handled = true;
}
}
}
示例7: GetPassword_HelpRequested
private void GetPassword_HelpRequested(object sender, HelpEventArgs hlpevent)
{
//Translate the screen coordinates to client coordinates..........
Point p = this.PointToClient(hlpevent.MousePos);
Control b = FindControl(this, p);
if (b != null)
{
if (b == tbOldPassword || b == label1)
{
ttHelp.Show("previously set password for sealth mode ", b,5000);
}
else if (b == tbPassword || b == label2)
{
ttHelp.Show("Enter new password for sealth mode ", b,5000);
}
else if (b == tbConfirmPassowrd || b == label3)
{
ttHelp.Show("Confirm newly entered password by reentering here", b,5000);
}
}
hlpevent.Handled = true;
}
示例8: OnHelpRequested
// Process a help request on the form.
protected override void OnHelpRequested(HelpEventArgs e)
{
base.OnHelpRequested(e);
dialog.EmitHelpRequest(e);
}
示例9: btnGetOffsetFromEditor_HelpRequested
private void btnGetOffsetFromEditor_HelpRequested(object sender, HelpEventArgs hlpevent)
{
ToolBarHelpDLG HelpInfo = new ToolBarHelpDLG();
string fileName = AssemblyDirectory + "/Help/GetOffsetFromEditor.htm";
HelpInfo.webBrowser1.Url = new Uri(fileName);
HelpInfo.Location = btnGetOffsetFromEditor.Location;
HelpInfo.Owner = this;
HelpInfo.Show();
hlpevent.Handled = true;
}
示例10: OnHelpRequested
/// <summary>
/// Defines the event delegate when help is requested.
/// </summary>
/// <param name="sender"></param>
/// <param name="hlpevent"></param>
private void OnHelpRequested(object sender, HelpEventArgs hlpevent)
{
if (String.IsNullOrEmpty(this.helpTopic))
{
return;
}
this.ShowHelp();
hlpevent.Handled = true;
}
示例11: Config_HelpRequested
private void Config_HelpRequested(object sender, HelpEventArgs hlpevent)
{
IrssHelp.Open(sender);
}
示例12: OnControlHelp
/// <include file='doc\HelpProvider.uex' path='docs/doc[@for="HelpProvider.OnControlHelp"]/*' />
/// <devdoc>
/// Handles the help event for any bound controls.
/// </devdoc>
/// <internalonly/>
private void OnControlHelp(object sender, HelpEventArgs hevent) {
Control ctl = (Control)sender;
string helpString = GetHelpString(ctl);
string keyword = GetHelpKeyword(ctl);
HelpNavigator navigator = GetHelpNavigator(ctl);
bool show = GetShowHelp(ctl);
if (!show) {
return;
}
// If the mouse was down, we first try whats this help
//
if (Control.MouseButtons != MouseButtons.None && helpString != null) {
Debug.WriteLineIf(Help.WindowsFormsHelpTrace.TraceVerbose, "HelpProvider:: Mouse down w/ helpstring");
if (helpString.Length > 0) {
Help.ShowPopup(ctl, helpString, hevent.MousePos);
hevent.Handled = true;
}
}
// If we have a help file, and help keyword we try F1 help next
//
if (!hevent.Handled && helpNamespace != null) {
Debug.WriteLineIf(Help.WindowsFormsHelpTrace.TraceVerbose, "HelpProvider:: F1 help");
if (keyword != null) {
if (keyword.Length > 0) {
Help.ShowHelp(ctl, helpNamespace, navigator, keyword);
hevent.Handled = true;
}
}
if (!hevent.Handled) {
Help.ShowHelp(ctl, helpNamespace, navigator);
hevent.Handled = true;
}
}
// So at this point we don't have a help keyword, so try to display
// the whats this help
//
if (!hevent.Handled && helpString != null) {
Debug.WriteLineIf(Help.WindowsFormsHelpTrace.TraceVerbose, "HelpProvider:: back to helpstring");
if (helpString.Length > 0) {
Help.ShowPopup(ctl, helpString, hevent.MousePos);
hevent.Handled = true;
}
}
// As a last resort, just popup the contents page of the help file...
//
if (!hevent.Handled && helpNamespace != null) {
Debug.WriteLineIf(Help.WindowsFormsHelpTrace.TraceVerbose, "HelpProvider:: contents");
Help.ShowHelp(ctl, helpNamespace);
hevent.Handled = true;
}
}
示例13: OnHelpRequested
protected override void OnHelpRequested(HelpEventArgs hlpevent)
{
ProtectDialogHelpHelper.ShowHelpByTopicId(this, ProtectDialogHelpHelper.TopicId.PesMobileClient);
}
示例14: mapPropertyEditor_HelpRequested
/// <summary>
/// HelpRequested event handler of the mapPropertyEditor control.
/// </summary>
/// <param name="sender">The source object of this event.</param>
/// <param name="hlpevent">The parameters of the help event.</param>
void mapPropertyEditor_HelpRequested(object sender, HelpEventArgs hlpevent)
{
if (this.HelpRequested != null)
this.HelpRequested(sender, hlpevent);
}
示例15: OnHelpRequested
private void OnHelpRequested(object sender, HelpEventArgs e)
{
OnClickHelpButton(null, null);
}