public async void Run(IBackgroundTaskInstance taskInstance) { var deferral = taskInstance.GetDeferral(); var details = taskInstance.TriggerDetails as ToastNotificationActionTriggerDetail; if (details != null) { string arguments = details.Argument; // this is where you would retreive any user input var userInput = details.UserInput; var json = await ToDoTaskFileHelper.ReadToDoTaskJsonAsync(); var task = ToDoTask.FromJson(json); task.IsComplete = arguments == "yes"; await ToDoTaskFileHelper.SaveToDoTaskJson(task.ToJson()); } deferral.Complete(); }
private async void Refresh() { var json = await ToDoTaskFileHelper.ReadToDoTaskJsonAsync(); CurrentToDoTask = ToDoTask.FromJson(json); }