public CoverageFormVM(StudyUnitVM studyUnit) : base(studyUnit) { coverage = studyUnit.CoverageModel; topics = new ObservableCollection <CheckOptionVM>(); foreach (CheckOption topic in coverage.Topics) { topics.Add(new CheckOptionVM(this, topic)); } areas = new ObservableCollection <CheckOptionVM>(); foreach (CheckOption area in coverage.Areas) { areas.Add(new CheckOptionVM(this, area)); } keywords = new ObservableCollection <KeywordVM>(); foreach (Keyword keywordModel in coverage.Keywords) { KeywordVM keyword = new KeywordVM(keywordModel); InitKeyword(keyword); keywords.Add(keyword); } modelSyncher = new ModelSyncher <KeywordVM, Keyword>(this, keywords, coverage.Keywords); }
public void InitKeyword(KeywordVM keyword) { keyword.Parent = this; }