public void EditScheduleTitleMap(ScheduleTitleMap favoriteWorkTask) { var editDialogVm = new TaskConfigEditDialogViewModel("取込時のタイトル", favoriteWorkTask.MapTitle, favoriteWorkTask.ConvertToDomainModel()); editDialogVm.ShowQuickStartButton.Value = false; editDialogVm.ShowDeleteButton.Value = true; var result = TransitionHelper.Current.TransitionModal <TaskConfigEditDialog>(editDialogVm); if (result == ModalTransitionResponse.Yes) { if (editDialogVm.NeedDelete) { ScheduleTitleMaps.Remove(favoriteWorkTask); RegistScheduleTitleMapsConfig(); } else { var inputValue = editDialogVm.TaskCardViewModel.DomainModel; // 変更通知機能がないのでdelete-insert方式で無理やりViewに変更通知する var targetIndex = ScheduleTitleMaps.IndexOf(favoriteWorkTask); ScheduleTitleMaps.RemoveAt(targetIndex); var favTask = ScheduleTitleMap.FromDomainObject(inputValue); favTask.MapTitle = editDialogVm.ConfigTitle.Value; ScheduleTitleMaps.Insert(targetIndex, favTask); RegistScheduleTitleMapsConfig(); } } }
public void AddScheduleTitleMap() { var editDialogVm = new TaskConfigEditDialogViewModel("取込時のタイトル", ""); editDialogVm.ShowQuickStartButton.Value = false; var result = TransitionHelper.Current.TransitionModal <TaskConfigEditDialog>(editDialogVm); if (result == ModalTransitionResponse.Yes) { var inputValue = editDialogVm.TaskCardViewModel.DomainModel; var favTask = ScheduleTitleMap.FromDomainObject(inputValue); favTask.MapTitle = editDialogVm.ConfigTitle.Value; ScheduleTitleMaps.Add(favTask); RegistScheduleTitleMapsConfig(); } }
public void AddFavoriteTask() { var editDialogVm = new TaskConfigEditDialogViewModel("ボタンタイトル", ""); editDialogVm.ShowQuickStartButton.Value = false; var result = TransitionHelper.Current.TransitionModal <TaskConfigEditDialog>(editDialogVm); if (result == ModalTransitionResponse.Yes) { var inputValue = editDialogVm.TaskCardViewModel.DomainModel; var favTask = FavoriteWorkTask.FromDomainObject(inputValue); favTask.ButtonTitle = editDialogVm.ConfigTitle.Value; FavoriteWorkTasks.Add(favTask); RegistFavoriteWorkTasksConfig(); } }