void doneIconButton_Click(object sender, EventArgs e) { TodoistService todoistService = new TodoistService(); var cmdTimeGenerated = DateTime.Now; var tempID = Utils.DateTimeToUnixTimestamp(cmdTimeGenerated); projSelected.name = projectNameTextBox.Text; projSelected.color = ((int)ColorPickerListBox.SelectedItem); todoistService.EditProject(cmdTimeGenerated, projSelected, (data) => { todoistService.GetData( (fullData) => { var updatedProject = fullData.Projects.Where(x => x.id == projSelected.id).First(); UpdateContext(); MainTodoistPage.updateAll(fullData); ProjectDetail.showMessage = (progress) => { ProjectDetail.projectSelected = updatedProject; Utils.ProgressIndicatorStatus(String.Format("\"{0}\" changed.", projSelected.name), progress); }; }, (error) => { MessageBox.Show(Utils.Message(error), "Metroist", MessageBoxButton.OK); }, () => { NavigationService.GoBack(); }); }, (errorMsg) => { MessageBox.Show(Utils.Message(errorMsg), "Metroist", MessageBoxButton.OK); }); }