public void atualizar(Sirene sirene) { if (sirene == objetoObservado) { System.Diagnostics.Debug.WriteLine("[ATENÇÃO] A sirente mudou para : " + objetoObservado.getAlerta()); } }
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(); } }