Example #1
0
    public static void Play(int tempoMili, NotaMusical nota)
    {
        beepNota      = nota;
        beepTempoMili = tempoMili;

        Thread thread = new Thread(
            new ThreadStart(Beep)
            );

        thread.Start();
        Thread.Sleep(tempoMili);
    }
Example #2
0
        public static void Exibir(int tempoMili, NotaMusical somChar, Object mensagem)
        {
            ForegroundColor = White;
            BackgroundColor = Black;

            char[] arrayChar = mensagem.ToString().ToCharArray();

            for (int cont = 0; cont < arrayChar.Length; cont++)
            {
                Som.Play(tempoMili, somChar);
                Write(arrayChar[cont]);
                Thread.Sleep(tempoMili);
            }
        }
Example #3
0
        public static void Exibir(int tempoMili, NotaMusical somNota, ConsoleColor corFundo, ConsoleColor corTexto, Object mensagem)
        {
            BackgroundColor = corFundo;
            ForegroundColor = corTexto;

            char[] arrayChar = mensagem.ToString().ToCharArray();

            for (int cont = 0; cont < arrayChar.Length; cont++)
            {
                Som.Play(tempoMili, somNota);
                Write(arrayChar[cont]);
                Thread.Sleep(tempoMili);
            }

            BackgroundColor = Black;
            ForegroundColor = White;
        }
Example #4
0
 public static void Play(NotaMusical nota)
 {
     Play(tempoMiliPadrao, nota);
 }