Esempio n. 1
0
		private void AddControl(Control control, BalloonTipInfo info)
		{
			if(m_BalloonsInfo.Contains(control))
				return;
			m_BalloonsInfo.Add(control,info);
			// Hook-up events
			control.MouseEnter+=new EventHandler(this.ControlMouseEnter);
			control.MouseLeave+=new EventHandler(this.ControlMouseLeave);
			control.Enter+=new EventHandler(this.ControlGotFocus);
			control.Leave+=new EventHandler(this.ControlLeave);
		}
Esempio n. 2
0
		private Balloon CreateBalloonControl(BalloonTipInfo info)
		{
			Balloon b=new Balloon();
			b.CaptionText=info.Caption;
			b.Text=info.Text;
			b.AutoClose=m_AutoClose;
			b.AutoCloseTimeOut=m_AutoCloseTimeOut;
			b.CaptionImage=this.CaptionImage;
			b.CaptionIcon=this.CaptionIcon;
			b.AlertAnimation=m_AlertAnimation;
			b.AlertAnimationDuration=m_AlertAnimationDuration;
			b.ShowCloseButton=m_ShowCloseButton;
			b.Style=m_Style;
            b.MinimumBalloonWidth = _MinimumBalloonWidth;
			if(info.Caption=="" || info.Caption==null)
			{
				b.Width=this.DefaultBalloonWidth;
			}
			else
				b.AutoResize();

			return b;
		}
Esempio n. 3
0
        public void SetBalloonText(Control control, string text)
		{
			if(text==null)
				text="";
			if(m_BalloonsInfo.Contains(control))
			{
				BalloonTipInfo info=m_BalloonsInfo[control] as BalloonTipInfo;
				if(info!=null)
				{
					info.Text=text;
					if(info.Caption=="" && info.Text=="")
					{
						this.Remove(control);
					}
				}
			}
			else if(text!="")
			{
				BalloonTipInfo info=new BalloonTipInfo();
				info.Text=text;
				this.AddControl(control,info);
			}
		}