private void SoundToggle_Tapped(object sender, EventArgs e)
        {
            if (setup.alarm.SoundStatus)
            {
                if (currentSound != null)
                {
                    ringtones.StopRingtone(currentSound.Name);
                }

                setup.alarm.SoundStatus = false;
                List <Alarm> alarms = new List <Alarm>();
                alarms.Add(setup.alarm);
                listSoundToggle.ItemsSource = alarms;
            }
            else
            {
                setup.alarm.SoundStatus = true;
                List <Alarm> alarms = new List <Alarm>();
                alarms.Add(setup.alarm);
                listSoundToggle.ItemsSource = alarms;
            }
        }
示例#2
0
        public void CancelAlarm()
        {
            Ringtones ringtones = new Ringtones();

            ringtones.StopRingtone(alarm.SoundName);
            CancelVibration = true;
            Vibration.Cancel();
            alarm.Status = false;
            FileManager fileManager = new FileManager();

            fileManager.SaveAlarm(alarm);
            Navigation.PopAsync();
        }
示例#3
0
 private void Button_Clicked(object sender, EventArgs e)
 {
     if (entry.Text == code)
     {
         Ringtones ringtones = new Ringtones();
         ringtones.StopRingtone(alarmPage.alarm.SoundName);
         alarmPage.CancelVibration = true;
         Vibration.Cancel();
         alarmPage.alarm.Status = false;
         FileManager fileManager = new FileManager();
         fileManager.SaveAlarm(alarmPage.alarm);
         CloseApp closeApp = new CloseApp();
     }
 }