コード例 #1
0
        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) { }
        }
コード例 #2
0
 private void Evac_Worker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
 {
     Evac_Timer.Start();
 }