public void Init(
            CAgentFinderFromKey agentFinder,
            IBaseTypesAlarmes baseAlarmes,
            IDefinition rootDefinition)
        {
            m_originalAgentFinder = agentFinder;
            CMemoryDb dbEdition = new CMemoryDb();

            m_agentFinder           = dbEdition.ImporteObjet(agentFinder, true, true) as CAgentFinderFromKey;
            m_agentFinder.TypeAgent = agentFinder.TypeAgent;
            m_baseTypesAlarmes      = baseAlarmes;
            InitChamps();
        }
Beispiel #2
0
        public void Init(
            CTrapHandler handler,
            IBaseTypesAlarmes baseAlarmes,
            IDefinition rootDefinition)
        {
            m_originalHandler = handler;
            CMemoryDb dbEdition = new CMemoryDb();

            m_handler           = dbEdition.ImporteObjet(handler, true, true) as CTrapHandler;
            m_handler.TypeAgent = handler.TypeAgent;
            m_baseTypesAlarmes  = baseAlarmes;
            InitChamps();
        }
Beispiel #3
0
        public static bool EditeTrapHandler(
            CTrapHandler handler,
            IBaseTypesAlarmes baseTypes,
            IDefinition rootDefinition)
        {
            CFormEditeTrapHandler form = new CFormEditeTrapHandler();

            form.m_handler         = handler;
            form.m_baseTypesAlarme = baseTypes;
            form.m_rootDefinition  = rootDefinition;
            bool bResult = form.ShowDialog() == DialogResult.OK;

            form.Dispose();
            return(bResult);
        }
Beispiel #4
0
        public static bool EditeAgentFinder(
            CAgentFinderFromKey agentFinder,
            IBaseTypesAlarmes baseTypes,
            IDefinition rootDefinition)
        {
            CFormEditAgentFinder form = new CFormEditAgentFinder();

            form.m_agentFinder     = agentFinder;
            form.m_baseTypesAlarme = baseTypes;
            form.m_rootDefinition  = rootDefinition;
            bool bResult = form.ShowDialog() == DialogResult.OK;

            form.Dispose();
            return(bResult);
        }
Beispiel #5
0
        public void Init(
            CSnmpConnexion connexion,
            IDefinition rootDefinition,
            CTypeAgentPourSupervision baseHandlers,
            IBaseTypesAlarmes baseTypes)
        {
            m_connexion = connexion;
            m_browser.Init(rootDefinition, connexion);
            m_baseHandlers = baseHandlers;
            CDynamicSnmpAgent agent = new CDynamicSnmpAgent(rootDefinition);

            agent.Connexion             = connexion;
            m_baseHandlers.AgentAssocie = agent;
            m_baseTypesAlarmes          = baseTypes;

            FillListeHandlers();
            FillListeQueries();
            FillListeTypeEntites();
        }
Beispiel #6
0
        //-------------------------------------------------------
        public static bool EditeCreateur(CCreateurAlarme createur, IBaseTypesAlarmes baseAlarmes)
        {
            CFormEditCreateurAlarme form = new CFormEditCreateurAlarme();
            CMemoryDb dbEdition          = new CMemoryDb();

            form.m_createur = dbEdition.ImporteObjet(createur, true, true) as CCreateurAlarme;
            //form.m_createur = CCloner2iSerializable.Clone(createur) as CCreateurAlarme;
            form.m_createur.TrapHandler = createur.TrapHandler;
            form.m_baseTypesAlarmes     = baseAlarmes;
            bool bResult = false;

            if (form.ShowDialog() == DialogResult.OK)
            {
                createur.Database.ImporteObjet(form.m_createur, true, true);
                bResult = true;
            }
            form.Dispose();
            return(bResult);
        }
Beispiel #7
0
 //---------------------------------------------------------------------
 public static void SetCurrentBase(IBaseTypesAlarmes baseTypeAlarmes)
 {
     m_baseTypesAlarmes = baseTypeAlarmes;
 }