void MonitoreoProceso_Main(object sender, MonitoreoEventArgs e) { //if (ListadoLog == null) //{ // ListadoLog = new List<LogPantalla>(); //} LogPantalla newLog = new LogPantalla(); newLog.Mensaje = e.Texto; newLog.Fecha = DateTime.Now; ListadoLog.Add(newLog); if (this.gcRejilla.InvokeRequired == true) { AsignarRegistrosRejilla d = new AsignarRegistrosRejilla(RefrescarRejilla); this.Invoke(d, new object[] { }); } else { RefrescarRejilla(); } }
void MonitoreoProceso_Main(object sender, MonitoreoEventArgs e) { bool TramaVentaManguera = false; bool Levanta = false; string galones = ""; string dinero = ""; if (e.Texto == "LEVANTAMANGUERA") { TramaVentaManguera = true; Levanta = true; } if (e.Texto.StartsWith("BAJAMANGUERA")) { string[] arrayMensaje = UtilidadesTramas.ObtieneArrayTrama(e.Texto); if (arrayMensaje.Count() == 3) { galones = arrayMensaje[1]; dinero = arrayMensaje[2]; } TramaVentaManguera = true; Levanta = false; } if (TramaVentaManguera == true) { if (this.InvokeRequired == true) { LevantaBajaMangueraEvent d = new LevantaBajaMangueraEvent(LevantaoBajaManguera); this.Invoke(d, e.Cara, e.IdXbee, Levanta, galones, dinero); } else { LevantaoBajaManguera(e.Cara, e.IdXbee, Levanta,galones,dinero); } return; } LogPantalla newLog = new LogPantalla(); newLog.Mensaje = e.Texto; newLog.Fecha = DateTime.Now; newLog.Dispositivo = e.Dispositivo; if (this.SFGridLog.InvokeRequired == true) { AsignarRegistrosRejilla d = new AsignarRegistrosRejilla(RefrescarRejilla); this.Invoke(d, newLog); } else { RefrescarRejilla(newLog); } }