public static void Play(int tempoMili, NotaMusical nota) { beepNota = nota; beepTempoMili = tempoMili; Thread thread = new Thread( new ThreadStart(Beep) ); thread.Start(); Thread.Sleep(tempoMili); }
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); } }
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; }
public static void Play(NotaMusical nota) { Play(tempoMiliPadrao, nota); }