public HelpProvider() { controls = new Hashtable(); tooltip = new ToolTip.ToolTipWindow(); #if NET_2_0 //UIA Framework: Event used to indicate that ToolTip is shown tooltip.VisibleChanged += delegate(object sender, EventArgs args) { if (tooltip.Visible == true) { OnUIAHelpRequested(this, new ControlEventArgs(UIAControl)); } else { OnUIAHelpUnRequested(this, new ControlEventArgs(UIAControl)); } }; #endif HideToolTipHandler = new EventHandler(HideToolTip); HideToolTipKeyHandler = new KeyPressEventHandler(HideToolTipKey); HideToolTipMouseHandler = new MouseEventHandler(HideToolTipMouse); HelpRequestHandler = new HelpEventHandler(HelpRequested); }
public ErrorProvider() { controls = new Hashtable(); blinkrate = 250; blinkstyle = ErrorBlinkStyle.BlinkIfDifferentError; icon = ResourceImageLoader.GetIcon("errorProvider.ico"); tooltip = new ToolTip.ToolTipWindow(); //UIA Framework: Event used to indicate the ToolTip is shown/hidden. tooltip.VisibleChanged += delegate(object sender, EventArgs args) { if (tooltip.Visible == true) { OnUIAPopup(this, new PopupEventArgs(UIAControl, UIAControl, false, Size.Empty)); } else if (tooltip.Visible == false) { OnUIAUnPopup(this, new PopupEventArgs(UIAControl, UIAControl, false, Size.Empty)); } }; }
// Called from timer (with only_refresh = false) // Called from ToolTipStart if tooltip is already shown (with only_refresh = true) public void ToolTipShow(bool only_refresh) { if (!form.Visible) { return; } string text = Locale.GetText(tooltip_hovered_button.Caption.ToString()); tooltip_timer.Interval = tooltip_hide_interval; tooltip_timer.Enabled = true; if (only_refresh && (tooltip == null || !tooltip.Visible)) { return; } if (tooltip == null) { tooltip = new ToolTip.ToolTipWindow(); } else if (tooltip.Text == text && tooltip.Visible) { return; } else if (tooltip.Visible) { tooltip.Visible = false; } if (form.WindowState == FormWindowState.Maximized && form.MdiParent != null) { tooltip.Present(form.MdiParent, text); } else { tooltip.Present(form, text); } }
public abstract Size ToolTipSize(ToolTip.ToolTipWindow tt, string text);
public abstract void DrawToolTip(Graphics dc, Rectangle clip_rectangle, ToolTip.ToolTipWindow control);
// Called from timer (with only_refresh = false) // Called from ToolTipStart if tooltip is already shown (with only_refresh = true) public void ToolTipShow (bool only_refresh) { if (!form.Visible) return; string text = Locale.GetText (tooltip_hovered_button.Caption.ToString ()); tooltip_timer.Interval = tooltip_hide_interval; tooltip_timer.Enabled = true; if (only_refresh && (tooltip == null || !tooltip.Visible)) { return; } if (tooltip == null) tooltip = new ToolTip.ToolTipWindow (); else if (tooltip.Text == text && tooltip.Visible) return; else if (tooltip.Visible) tooltip.Visible = false; if (form.WindowState == FormWindowState.Maximized && form.MdiParent != null) tooltip.Present (form.MdiParent, text); else tooltip.Present (form, text); }
public HelpProvider() { controls = new Hashtable(); tooltip = new ToolTip.ToolTipWindow(); //UIA Framework: Event used to indicate that ToolTip is shown tooltip.VisibleChanged += delegate (object sender, EventArgs args) { if (tooltip.Visible == true) OnUIAHelpRequested (this, new ControlEventArgs (UIAControl)); else OnUIAHelpUnRequested (this, new ControlEventArgs (UIAControl)); }; HideToolTipHandler = new EventHandler(HideToolTip); HideToolTipKeyHandler = new KeyPressEventHandler(HideToolTipKey); HideToolTipMouseHandler = new MouseEventHandler(HideToolTipMouse); HelpRequestHandler = new HelpEventHandler(HelpRequested); }
public ErrorProvider() { controls = new Hashtable(); blinkrate = 250; blinkstyle = ErrorBlinkStyle.BlinkIfDifferentError; icon = ResourceImageLoader.GetIcon ("errorProvider.ico"); tooltip = new ToolTip.ToolTipWindow(); #if NET_2_0 //UIA Framework: Event used to indicate the ToolTip is shown/hidden. tooltip.VisibleChanged += delegate (object sender, EventArgs args) { if (tooltip.Visible == true) OnUIAPopup (this, new PopupEventArgs (UIAControl, UIAControl, false, Size.Empty)); else if (tooltip.Visible == false) OnUIAUnPopup (this, new PopupEventArgs (UIAControl, UIAControl, false, Size.Empty)); }; #endif }