示例#1
0
        public void SetEntry(EntryModel model, CrudState state)
        {
            if (SelectedEntry != null)
            {
                SelectedEntry.PropertyChanged -= SelectedEntryOnPropertyChanged;
            }
            SelectedEntry = model;
            SelectedEntry.PropertyChanged += SelectedEntryOnPropertyChanged;

            if (SelectedEntryContent != null)
            {
                SelectedEntryContent.PropertyChanged -= SelectedEntryContentOnPropertyChanged;
            }
            SelectedEntryContent = _folderRepository.GetEntryContent <T>(model);
            SelectedEntryContent.PropertyChanged += SelectedEntryContentOnPropertyChanged;

            _state = state;
        }