Exemplo n.º 1
0
        public void AddChild(IRuntimeFor2iWnd child)
        {
            List <IRuntimeFor2iWnd> lst = new List <IRuntimeFor2iWnd>(Childs);

            lst.Add(child);
            SetControlesFils(lst.ToArray());
        }
Exemplo n.º 2
0
 //----------------------------------------------------------------------------------------
 public void AttacheToWndFor2iWnd(IRuntimeFor2iWnd wnd)
 {
     m_runtime = wnd;
     foreach (CHandlerEvenementParFormule handler in wnd.WndAssociee.GetHanlders())
     {
         if (handler.FormuleEvenement != null)
         {
             //Trouve l'evenement dans le type
             EventInfo info = m_controleAssocie.GetType().GetEvent(handler.IdEvenement);
             if (info != null)
             {
                 info.AddEventHandler(m_controleAssocie, new ControleExterneEventHandler(OnEventSurControle));
             }
         }
     }
 }
Exemplo n.º 3
0
        void ReadSnmpEntity(object sender, EventArgs e)
        {
            CEntiteSnmp entite = EditedElement as CEntiteSnmp;

            if (entite != null)
            {
                CResultAErreur result = CResultAErreur.True;
                using (CWaitCursor waiter = new CWaitCursor())
                {
                    result = entite.LireValeursSnmp();
                    //Trouve le parent
                    IRuntimeFor2iWnd parent = this;
                    while (parent.WndContainer is IRuntimeFor2iWnd)
                    {
                        parent = parent.WndContainer as IRuntimeFor2iWnd;
                    }
                    parent.UpdateValeursCalculees();
                }
                if (!result)
                {
                    CFormAlerte.Afficher(result.Erreur);
                }
            }
        }