private void UpdateResponses() {
Responses.Clear();
if (task == null || !task.Labels.ContainsKey(RecipientsKey)) return;
UpdateTaskStatus();
foreach (var recipient in task.Labels[RecipientsKey].Split(new[] {','}, StringSplitOptions.RemoveEmptyEntries)) {
var responseViewModel = new ResponseViewModel(recipient);
var recipientKey = recipient.Trim().Replace(' ', '_');
if (task.Labels.ContainsKey(recipientKey)) responseViewModel.Response = task.Labels[recipientKey];
responseViewModel.PropertyChanged += (sender, args) => {
task.Labels[responseViewModel.LabelKey] = responseViewModel.Response;
if (service.IsLocal) service.SaveXml();
task.NotifyOfPropertyChange("Labels");
UpdateTaskStatus();
};
Responses.Add(responseViewModel);
}
}