示例#1
0
 public void atualizar(Sirene sirene)
 {
     if (sirene == objetoObservado)
     {
         System.Diagnostics.Debug.WriteLine("[ATENÇÃO] A sirente mudou para : " + objetoObservado.getAlerta());
     }
 }
示例#2
0
        public void Abrir(Sons sons)
        {
            if (sons == Sons.Sirene) //
            {
                Sirene.PlayLooping();
            }
            else if (sons == Sons.SuperPilula) //
            {
                SuperPilula.Play();
            }
            else //
            {
                WinApi.MciSendString("close myaudio", "", 0, IntPtr.Zero);
                WinApi.MciSendString(string.Concat("open ", Caminho.Audios, sons, ".wav", " alias myaudio"), "", 0, IntPtr.Zero);
                WinApi.MciSendString("set myaudio time format ms", "", 0, IntPtr.Zero);
                WinApi.MciSendString("status myaudio length", new string(Convert.ToChar(" "), 128), 128, IntPtr.Zero);

                Reproduzir();
            }
        }