Ejemplo n.º 1
0
        protected override CResultAErreur MyInitChamps(CCustomizableListItem item)
        {
            CResultAErreur result = CResultAErreur.True;

            if (item != null)
            {
                CFormNotificationPopup.CMessageNotification m = item.Tag as CFormNotificationPopup.CMessageNotification;
                if (m != null)
                {
                    if (m.Image != null)
                    {
                        m_panelImage.Visible = true;
                        m_imageNotif.Image   = m.Image;
                    }
                    else
                    {
                        m_panelImage.Visible = false;
                    }
                    m_link.Text = m.Message;
                    Graphics g = m_link.CreateGraphics();
                    SizeF    s = g.MeasureString(m.Message, m_link.Font, m_link.Width);
                    Height = Math.Max((int)s.Height + m_panelSep.Height, 25);
                }
            }
            return(result);
        }
Ejemplo n.º 2
0
 //------------------------------------------------------
 private void m_link_Click(object sender, EventArgs e)
 {
     CFormNotificationPopup.CMessageNotification m = CurrentItem != null ?
                                                     CurrentItem.Tag as CFormNotificationPopup.CMessageNotification :
                                                     null;
     if (m != null)
     {
         IDonneeNotification donnee = m.DonneeNotification;
         CGestionnaireNotificationsPopup.ExecuteNotification(donnee);
         if (OnNotificationExecuted != null)
         {
             OnNotificationExecuted(m, null);
         }
     }
 }