public MeaningEditModel(DataRowView row) : base(row) { this.translations = CreateFilteredPresentationList<TranslationModel>(Strings.TRANSLATIONS, Strings.MEANING_ID); this.synonyms = CreateFilteredPresentationList<WordRefItemModel>(Strings.SYNONYMS, Strings.MEANING_ID); this.antonyms = CreateFilteredPresentationList<WordRefItemModel>(Strings.ANTONYMS, Strings.MEANING_ID); }
public LinguaSpaceModel(LinguaSpaceDataSet dataSet) : base(dataSet) { this.pathVocabulary = String.Empty; this.pathProfile = String.Empty; this.isVocabularyDirty = false; HookListChanged(Strings.VOCABULARIES); HookListChanged(Strings.TYPES); HookListChanged(Strings.WORDS); HookListChanged(Strings.MEANINGS); HookListChanged(Strings.TRANSLATIONS); HookListChanged(Strings.SYNONYMS); HookListChanged(Strings.ANTONYMS); this.modelProfiles = new PresentationBindingList<ProfileModel>(this.DataSet.Tables[Strings.PROFILES].DefaultView); this.modelVocabularies = new PresentationBindingList<VocabularyModel>(this.DataSet.Tables[Strings.VOCABULARIES].DefaultView); this.modelWords = new PresentationBindingList<WordItemModel>(this.DataSet.Tables[Strings.WORDS].DefaultView); DataView meanings = this.DataSet.Tables[Strings.MEANINGS].DefaultView; ITypedList typedList = (ITypedList)meanings; PropertyDescriptorCollection properties = typedList.GetItemProperties(null); PropertyDescriptor property = properties.Find(Strings.WORD_ID, false); this.modelMeanings = new PresentationBindingList<MeaningItemModel>(new FilterBindingList(meanings, property)); }
public VocabularyModel(DataRowView rv) : base(rv) { LinguaSpaceDataSet dataSet = (LinguaSpaceDataSet)rv.DataView.Table.DataSet; this.types = new PresentationBindingList<TypeModel>(dataSet.Tables[Strings.TYPES].DefaultView); }