コード例 #1
0
        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);
        }
コード例 #2
0
        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));
                }
            };
        }
コード例 #3
0
        // 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);
            }
        }
コード例 #4
0
ファイル: Theme.cs プロジェクト: yonder/mono
 public abstract Size ToolTipSize(ToolTip.ToolTipWindow tt, string text);
コード例 #5
0
ファイル: Theme.cs プロジェクト: yonder/mono
 public abstract void DrawToolTip(Graphics dc, Rectangle clip_rectangle, ToolTip.ToolTipWindow control);
コード例 #6
0
ファイル: InternalWindowManager.cs プロジェクト: xzkmxd/mono
		// 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);
			
		}
コード例 #7
0
ファイル: HelpProvider.cs プロジェクト: nlhepler/mono
		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);
		}
コード例 #8
0
		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
		}