Ejemplo n.º 1
0
        /*
         *  iniciar()
         *  INICIA PROCESOS
         */
        public void iniciar()
        {
            Log.msg("[+] MODULO CM");
            List <string> estaciones = GetEstaciones();

            try
            {
                foreach (string estacion in estaciones)
                {
                    string[] get_nombre_maquina = estacion.Split('-');
                    string   nombre_estacion    = get_nombre_maquina[0].ToString();
                    int      numero_estacion    = int.Parse(estacion.Substring((estacion.Length - 1), 1));

                    string ruta_estacion = ruta + estacion + @"\";

                    List <string> mpr = getMPR(ruta_estacion);
                    foreach (string archivo_mpr in mpr)
                    {
                        string mprFullPath = ruta_estacion + archivo_mpr;
                        readMPR(mprFullPath, nombre_estacion, numero_estacion);
                    }

                    // Luego de procesar los MPR, si son las 23 hs, elimina todos los mpr de la estacion
                    if (RestartCAMX.isDeleteMprMode())
                    {
                        RestartCAMX.DoTheJob(ruta_estacion);
                    }
                }
            }
            catch (Exception ex)
            { Log.msg("[Error] No se puede Iniciar el modulo CM: " + ex.Message); }


            Log.msg("**** Procesos finalizados ****");
        }
Ejemplo n.º 2
0
        public void InitServiceCAMX()
        {
            Timer4CAMX.Enabled = false;
            List <String> checkedBoxes = new List <String>();

            foreach (object itemChecked in checkedListBox2.CheckedItems)
            {
                checkedBoxes.Add(itemChecked.ToString());
            }

            RestartCAMX.restartCAMXOnDemand(checkedBoxes);
        }