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