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