Condition for running alarms on Windows Phone 8.0

Asked

Viewed 35 times

0

When creating an alarm for Windows Phone 8.0 using the following code:

Alarm alarm = new Alarm(nome)
{
    BeginTime = dateValue,
    ExpirationTime = dateValue2,
    Content = "Horário!!!",
    RecurrenceType = RecurrenceInterval.Daily,
    };
ScheduledActionService.Add(alarm);

I would like to know how to manipulate this alarm to be executed based on a condition at the time it should be started.

  • Could you illustrate what you want to do for a better understanding? @

  • Well, I want to schedule a certain time frame. And if during this time interval, for example from 12h to 15h, a suitable temperature (not very hot) is found... I want the alarm to go off, warning the person that a suitable temperature has been found within the scheduled time interval! Understand?

  • That is, I will use a condition... I want to use the while... because the caraa will schedule an initial time and a final time... There is the following... I want to make a condition like this: while the initial time is greater or equal to the cell phone time and the final scheduled time is less or equal to the cell phone time... I want to be checking inside this while condition through an IF if if there is the appropriate temperature or not...

  • If the appropriate temperature is found I want the alarm to go off warning that it has been found... otherwise it will go off warning that it has not been found... Got it?

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.