public void ObtenerEstadoEvacuacionFacp() { try { this.Invoke((MethodInvoker) delegate { DataTable dt = new DataTable(); Procedimientos P = new Procedimientos(); P.ID_FACP = IdFacpToShow; dt = P.ObtenerEstadoEvacuacionFacp(); if (dt.Rows.Count > 0) { if (Convert.ToBoolean(dt.Rows[0][0].ToString())) { evac_lbl.Visible = true; if (!Evac) { Evac_timer.Start(); } Evac = true; } else { evac_lbl.Visible = false; Evac = false; Evac_timer.Stop(); } } }); } catch (Exception ex) { } }
private void Evac_Worker_DoWork(object sender, DoWorkEventArgs e) { try { Evac_timer.Stop(); this.Invoke((MethodInvoker) delegate { evac_lbl.Visible = !evac_lbl.Visible; }); } catch { } }
private void Evac_Worker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { Evac_timer.Start(); }