Esempio n. 1
0
        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);
        }
Esempio n. 2
0
 public void EditYear(ViewItemYear year)
 {
     ShowPopup(AddYearViewModel.CreateForEdit(MainScreenViewModel, year));
 }
Esempio n. 3
0
 public void AddYear()
 {
     ShowPopup(AddYearViewModel.CreateForAdd(MainScreenViewModel));
 }