public void PrintLexDBName(FdoCache fcTLP) { LangProject lp = fcTLP.LangProject; LexDb lxdb = lp.LexDbOA; Console.WriteLine(lxdb.Name.AnalysisDefaultWritingSystem); }
public void ListLexEntries(FdoCache fcTLP) { LexDb lxdb = fcTLP.LangProject.LexDbOA; FdoOwnColVector ocv = lxdb.EntriesOC; int[] vecEntryHvos = ocv.hvoArray; foreach (LexEntry e in ocv) { // Will return LexMajorEntry, LexSubentry, or LexMinorEntry, // since these are the classes that fit the signature of LexEntry. Console.WriteLine(e.CitationForm.VernacularDefaultWritingSystem + " is a " + e.GetType().Name); } }
public void MultilingualStringBasedonStringDictionary() { FdoReferenceSequence<LgWritingSystem> systems = Cache.LangProject.CurVernWssRS; LexDb ld = Cache.LangProject.LexDbOA; LexEntry le = MakeLexEntry("xyzTest1", "xyzDefn1.1", null); MoForm m = MoForm.MakeMorph(le, "-is"); // It will already have the right form. //m.FormAccessor.set_String(systems[1].Hvo, Cache.TsStrFactory.MakeString("iz", systems[1].Hvo)); string t = "<entry><objAtomic objProperty='LexemeFormOA'/></entry>"; string c = "<class name='MoForm'><multilingualStringElement name='form' simpleProperty='NamesWithMarkers'/></class>"; string result = GetResultStringFromEntry(le, t, c); Assert.AreEqual(String.Format("<entry><form ws=\"fr\">-is</form>{0}<form ws=\"ur\">-iz</form>{0}</entry>", Environment.NewLine), result.Trim()); }
protected void AddMissingMSAs() { int count = 0; Console.WriteLine("AddMissingMSAs()..."); LexDb l = m_cache.LangProj.LexDbOA; foreach (LexEntry e in l.EntriesOC) { if (e.MorphoSyntaxAnalysesOC.Count == 0) { ++count; Console.WriteLine("Adding Stem MSAs to " + e.ShortName); MoStemMsa s = e.MorphoSyntaxAnalysesOC.Add(new SIL.FieldWorks.FDO.Ling.MoStemMsa()) as MoStemMsa; } } Console.WriteLine("Changed " + count.ToString() + " entries."); }