public bool SetToolTipEx(System.Windows.Forms.Control control, ITipInfo pTipInfo)
 {
     if (control == null ||
         pTipInfo == null ||
         this.m_ToolTipInfoDictionary_Control.ContainsKey(control))
     {
         return(false);
     }
     //
     this.m_ToolTipInfoDictionary_Control.Add(control, pTipInfo);
     control.MouseEnter += new EventHandler(Control_MouseEnter);
     control.MouseLeave += new EventHandler(Control_MouseLeave);
     return(true);
 }
        public bool SetToolTip(IBaseItem2 pBaseItem, ITipInfo pTipInfo)
        {
            if (pBaseItem == null ||
                pTipInfo == null ||
                this.m_ToolTipInfoDictionary_BaseItem.ContainsKey(pBaseItem))
            {
                return(false);
            }
            //
            IBaseItemEvent pBaseItemEvent = pBaseItem as IBaseItemEvent;

            if (pBaseItemEvent == null)
            {
                return(false);
            }
            //
            this.m_ToolTipInfoDictionary_BaseItem.Add(pBaseItem, pTipInfo);
            pBaseItemEvent.MouseEnter += new EventHandler(BaseItem_MouseEnter);
            pBaseItemEvent.MouseLeave += new EventHandler(BaseItem_MouseLeave);
            return(true);
        }
Esempio n. 3
0
 public bool SetTipInfo(ITipInfo pTipInfo)
 {
     if (this.m_pTipInfo != pTipInfo)
     {
         this.m_pTipInfo = pTipInfo;
         //
         this.m_ImageLabelItem.Image   = this.m_pTipInfo.TitleImage;
         this.m_ImageLabelItem.Text    = this.m_pTipInfo.TitleText;
         this.m_ImageLabelItem.Visible = this.m_ImageLabelItem.Image != null || (this.m_ImageLabelItem.Text != null && this.m_ImageLabelItem.Text.Length > 0);
         this.m_LabelItem.Text         = this.m_pTipInfo.TipInfoText;
         this.m_LabelItem.Visible      = this.m_LabelItem.Text != null && this.m_LabelItem.Text.Length > 0;
         //
         if (this.m_ImageLabelItem.Visible && this.m_LabelItem.Visible)
         {
             this.Padding = new System.Windows.Forms.Padding(6, 6, 5, 3);
         }
         else
         {
             this.Padding = new System.Windows.Forms.Padding(3, 3, 0, 3);
         }
     }
     //
     return(this.m_ImageLabelItem.Visible || this.m_LabelItem.Visible);
 }
Esempio n. 4
0
 public bool SetTipInfo(ITipInfo pTipInfo)
 {
     return(this.m_ToolTipPopupPanel.SetTipInfo(pTipInfo));
 }