Exemple #1
0
        /// ////////////////////////////////////////////////////
        private void OnClickMenu(object sender, LinkLabelLinkClickedEventArgs args)
        {
            if (DesignMode)
            {
                return;
            }
            if (!(sender is Control))
            {
                return;
            }
            CMenuCustom menu = (CMenuCustom)args.Link.LinkData;

            if (menu.ListeMenusFils.Count == 0)
            {
                CResultAErreur result = CExecuteurActionSur2iLink.ExecuteAction(sender, menu.Action, null);
                if (!result)
                {
                    CFormAlerte.Afficher(result.Erreur);
                }
            }
            else
            {
                //Crée le menu
                CreateSousMenu(m_sousMenu.MenuItems, menu);
                m_sousMenu.Show((Control)sender, new Point(0, ((Control)sender).Height));
            }
        }
Exemple #2
0
        /// ////////////////////////////////////////////////////
        private void OnClickSousMenu(object sender, EventArgs args)
        {
            if (!(sender is CMenuItemTimos))
            {
                return;
            }
            CMenuCustom    menu   = ((CMenuItemTimos)sender).MenuCustom;
            CResultAErreur result = CExecuteurActionSur2iLink.ExecuteAction(sender, menu.Action, null);

            if (!result)
            {
                CFormAlerte.Afficher(result.Erreur);
            }
        }
 public CResultAErreur ExecuteAction(CObjetDonnee objet)
 {
     return(CExecuteurActionSur2iLink.ExecuteAction(m_controlSource, m_action, objet));
 }