protected override bool ProcessKeyPreview(ref Message m)
 {
     if (m.Msg == WM_SYSKEYUP && CurrentItem is CCustomizableListItemANiveau)
     {
         Keys key = (Keys)m.WParam;
         if (key == Keys.Left)
         {
             CEditeurOperationsPreventives ctrl = AssociatedListControl as CEditeurOperationsPreventives;
             if (ctrl != null)
             {
                 ctrl.DecrementeNiveau(CurrentItem as CItemOperation);
                 UpdateMarge();
                 ctrl.Refresh();
                 return(true);
             }
         }
         if (key == Keys.Right)
         {
             CEditeurOperationsPreventives ctrl = AssociatedListControl as CEditeurOperationsPreventives;
             if (ctrl != null)
             {
                 ctrl.IncrementeNiveau(CurrentItem as CItemOperation);
                 UpdateMarge();
                 ctrl.Refresh();
                 return(true);
             }
         }
     }
     return(base.ProcessKeyPreview(ref m));
 }
        private void m_picBoxAddLine_Click(object sender, EventArgs e)
        {
            Control parent = Parent;

            while (parent != null && !(parent is CEditeurOperationsPreventives))
            {
                parent = parent.Parent;
            }
            CEditeurOperationsPreventives editeur = parent as CEditeurOperationsPreventives;

            if (editeur != null)
            {
                editeur.AddOperationALaFin();
            }
        }
 //---------------------------------------------------------------------------
 private void m_btnPoubelle_Click(object sender, EventArgs e)
 {
     if (m_extModeEdition.ModeEdition)
     {
         CEditeurOperationsPreventives ctrlListe = AssociatedListControl as CEditeurOperationsPreventives;
         if (ctrlListe != null && CurrentItem != null)
         {
             CItemOperation item = CurrentItem as CItemOperation;
             if (item != null && item.Operation != null)
             {
                 if (CFormAlerte.Afficher(I.T("Delete operation @1|20679", Operation.Libelle),
                                          EFormAlerteBoutons.OuiNon, EFormAlerteType.Question) == DialogResult.Yes)
                 {
                     ctrlListe.RemoveItem(CurrentItem, true);
                 }
             }
         }
     }
 }