private void SoundSelected_Tapped(object sender, EventArgs e) { var ic = ((ImageCell)sender); listSound.SelectedItem = null; for (int i = 0; i < sounds.Count; i++) { if (ic.ClassId == sounds[i].Name) { currentSound = sounds[i]; sounds[i].Status = true; setup.alarm.SoundName = sounds[i].Name; setup.alarm.SoundUri = sounds[i].Uri; ringtones.PlayRingtone(sounds[i].Uri); StopSoundDelay(sounds[i].Name); } else { sounds[i].Status = false; } } listSound.ItemsSource = null; listSound.ItemsSource = sounds; }
private void PlaySound() { if (alarm.SoundStatus) { Ringtones ringtones = new Ringtones(); ringtones.PlayRingtone(alarm.SoundUri); } }