public static AddYearViewModel CreateForEdit(BaseViewModel parent, ViewItemYear yearToEdit) { var viewModel = new AddYearViewModel(parent) { State = OperationState.Editing, YearToEdit = yearToEdit, Name = yearToEdit.Name }; viewModel.ListenToItem(yearToEdit.Identifier).Deleted += viewModel.Year_Deleted; return(viewModel); }
public void EditYear(ViewItemYear year) { ShowPopup(AddYearViewModel.CreateForEdit(MainScreenViewModel, year)); }
public void AddYear() { ShowPopup(AddYearViewModel.CreateForAdd(MainScreenViewModel)); }