示例#1
0
        private void CheckOnlyCountActivityAndRefreshAlarmManager()
        {
            // Refresh AlarmManager
            Alarm.IsInitFinished = false;
            var allAlarms = alarmService.GetAllAlarms();

            Alarm.IsInitFinished = true;
            AlarmHelper.RefreshAlarmByManager100(allAlarms);

            OnlyCountDown();
        }
示例#2
0
        public async Task <IActionResult> Run(
            [HttpTrigger(AuthorizationLevel.Anonymous, "get", Route = "alarms")] HttpRequest req,
            ILogger log)
        {
            List <AlarmSystem.Core.Entity.DB.Alarm> alarms = _alarmService.GetAllAlarms();

            if (alarms.Count == 0)
            {
                return(new NoContentResult());
            }
            return(new OkObjectResult(alarms));
        }