0
我嘗試代碼波紋管採用敬酒,使報警通知,我需要知道如何讓每天都在重複或特定的一天:報警Toast通知窗口metro應用
DateTime dateTime = Convert.ToDateTime(time.ToString());
DateTime dateNow = DateTime.Now;
TimeSpan timenow = new TimeSpan(dateNow.Hour, dateNow.Minute, dateNow.Second);
double totalSocunds = time.TotalSeconds - timenow.TotalSeconds;
int sec = Convert.ToInt32(totalSocunds);
if (sec < 0)
{
sec = sec* -1;
}
else
{
sec = sec *1;
}
TimeSpan second = TimeSpan.FromSeconds(totalSocunds);
var customAlarmScheduledToast = new Windows.UI.Notifications.ScheduledToastNotification(toastDOM,DateTime.Now.AddSeconds(sec));
toastNotifier
.AddToSchedule(customAlarmScheduledToast);
你能解釋更多,如何使用它把我的代碼? –