Beispiel #1
0
        private void botonReproducirAvisoSonoro_Click(object sender, EventArgs e)
        {
            try
            {
                superTabControl1.SelectedTabIndex = 1;

                if (reproductor.Estado != EstadoReproductor.Reproduciendo)
                {
                    reproductor.ReproducirAvisoSonoro();
                    botonReproducirAvisoSonoro.Symbol = "\xf04d";
                    labelTiempoTotal.Text             = reproductor.TiempoTotal.ToString(@"mm\:ss");
                    timerControlPlayback.Interval     = 250;
                    timerControlPlayback.Start();

                    if (pararAvisoSonoro)
                    {
                        controlParadaTema = DateTime.Now;
                    }
                }
                else
                {
                    setParadaPlayback();
                }
            }

            catch (Exception ex)
            {
                MsgBox(ex.Message, "ERROR BRAS", MessageBoxIcon.Error);
            }
        }
Beispiel #2
0
        private void FormAvisos_Load(object sender, EventArgs e)
        {
            TopMost = setSiempreEncima(argSiempreEncima);

            switchTemaVisual();

            if (simVisual)
            {
                tipoForm = Formulario.Visual;
            }

            else if (avisoVisual && !avisoSonoro)
            {
                tipoForm = Formulario.Visual;
            }

            else if (avisoSonoro && !avisoVisual)
            {
                tipoForm = Formulario.Sonido;
            }

            else
            {
                tipoForm = Formulario.Ambos;
            }

            if (tipoForm == Formulario.Visual)
            {
                expandablePanel1.Expanded            = false;
                expandablePanel1.ExpandButtonVisible = false;
                expandablePanel1.TitleText           = "Aviso Visual";
            }

            else if (tipoForm == Formulario.Sonido)
            {
                labelMarquesina.Text = "Aviso Sonoro";
                MaximumSize          = new System.Drawing.Size(607, 215);
                MaximizeBox          = false;
                MinimizeBox          = false;
                expandablePanel1.ExpandButtonVisible = false;
                expandablePanel1.Font      = new Font("Microsoft Sans Serif", 8.25F, FontStyle.Italic, GraphicsUnit.Point, 0);
                expandablePanel1.TitleText = tipoSonoro == TipoAvisoSonoro.TemaPersonal ||
                                             string.IsNullOrEmpty(temaPersonalElegido) ? Path.GetFileName(temaPersonalElegido) : tipoSonoro.ToString();
            }

            if (tipoForm != Formulario.Visual) //Sonoros:
            {
                reproductor.CargarAvisoSonoro();
                reproductor.ReproducirAvisoSonoro();
            }

            if (tipoForm != Formulario.Sonido) //Visuales
            {
                labelMarquesina.Text = txtMarquesina;
                labelCuerpo.Text     = txtCuerpo;
                labelPie.Text        = txtPie;

                if (labelPie.Text.ToLower() == "fecha y hora")
                {
                    timerFechaHora.Start();
                }

                if (marquesinaMovil)
                {
                    labelMarquesina.Font = new Font("Calibri", 14F, FontStyle.Italic, GraphicsUnit.Point, 0);
                    timerMarquesinaMovil.Start();
                }

                else
                {
                    labelMarquesina.AutoSize = false;
                    labelMarquesina.Dock     = DockStyle.Fill;
                }

                if (coloreadoDinamico)
                {
                    timerConmutaColores.Start();
                }
            }
        }