Example #1
0
        /// <summary>
        /// Server general de comunicaciones con ALUTRACK. Aqui se centralizan todas las conexiones y
        /// desconexiones.
        /// </summary>
        public LAYERLenel(Aplicacion v_app,StringEventHandler v_logHandler)
        {
            mainApp = v_app;
            m_LOGHandler = v_logHandler;
            //MapZONADEFCompletePath  = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase) + @"\MapZONEDEF.html";

            MapZONADEFCompletePath = Path.GetDirectoryName(Application.ExecutablePath) + @"\MapZONEDEF.html";
            MapLENELCompletePath = Path.GetDirectoryName(Application.ExecutablePath) + @"\MapLENEL.html";
            ComunicationLayer = new LAYERCommunication(v_app,v_logHandler);
            repositorioBuffer = new Dictionary<string,byte[]>();
        }
        public communicationSystem(Aplicacion v_app, frmInicial v_MainForm , frmInicialCliente v_MainFormCliente)
        {
            mainApp = v_app;
            mainForm = v_MainForm;
            mainFormCliente = v_MainFormCliente;

            LOGInformation = new Queue<stringEventArgs>();

            socketServerGeneral = new SocketServer(puertos.PORT_TO_SEND, puertos.PORT_TO_RECEIVE, SystemConfiguration.GPSControlIP, SystemConfiguration.GPSControlPort, mainApp);

            socketServerGeneral.getEmployeeList += new StringEventHandler(addSendEmployeeListJob);
            socketServerGeneral.getImage += new StringEventHandler(addSendImageJob);
            socketServerGeneral.actualizeAccess += new byteArrayEventHandler(actualizeAcccess);
            socketServerGeneral.actualizeVisit += new byteArrayEventHandler(actualizeVisit);

            socketServerGeneral.actualizeGPSData += new StringEventHandler(actualizeGPS);

            socketServerGeneral.deleteEmp += new StringEventHandler(borrarEmp);
            socketServerGeneral.addEmp += new StringEventHandler(agregarEmp);
            socketServerGeneral.sendEmpxVersion += new byteArrayEventHandler(enviarEmpxVersion);
            socketServerGeneral.enviarListaImagenes += new byteArrayEventHandler(enviarListaImagenes);
            socketServerGeneral.enviarVersionImagenes += new StringEventHandler(enviarVersionImagenes);
            socketServerGeneral.enviarMasImagenes += new StringEventHandler(enviarMasImagenes);
            socketServerGeneral.enviarDummy+=new StringEventHandler(enviarDummy);

            socketServerGeneral.actualizarLOG += new StringEventHandler(agregarItemLOG);
            socketServerGeneral.HHGPSLayer.actualizarLOG += new StringEventHandler(agregarItemLOG);
            socketServerGeneral.confirmarLOG += new StringEventHandler(confirmarLOG);

            layerLENEL = new LAYERLenel(mainApp,agregarItemLOG);
            layerALUTRACK = new LAYERAlutrack(mainApp, agregarItemLOG);
            communicationLAYER = new LAYERCommunication(mainApp, agregarItemLOG);
        }
Example #3
0
 /// <summary>
 /// Server general de comunicaciones con ALUTRACK. Aqui se centralizan todas las conexiones y
 /// desconexiones.
 /// </summary>
 public LAYERAlutrack(Aplicacion v_app,StringEventHandler v_logHandler)
 {
     mainApp = v_app;
     m_LOGHandler = v_logHandler;
     repositorioBuffer = new Dictionary<string,byte[]>();
     ComunicationLayer = new LAYERCommunication(v_app,v_logHandler);
 }