private void InitFieldNames(InterlinMode mode) { LineOption[] options = LineOptions(mode); m_fieldNames.Clear(); foreach (LineOption opt in options) { m_fieldNames[opt.Flid] = opt.ToString(); } }
public InterlinLineChoices(FdoCache cache, int defaultVernacularWs, int defaultAnalysisWs, InterlinMode mode) { this.Mode = mode; InitFieldNames(mode); m_cache = cache; m_wsDefVern = defaultVernacularWs; if (defaultAnalysisWs == WritingSystemServices.kwsAnal) m_wsDefAnal = m_cache.DefaultAnalWs; else m_wsDefAnal = defaultAnalysisWs; }
public InterlinLineChoices(int defaultVernacularWs, int defaultAnalysisWs, ILangProject proj, InterlinMode mode) { this.Mode = mode; InitFieldNames(mode); if (defaultVernacularWs == 0) m_wsDefVern = LangProject.kwsVernInParagraph; else m_wsDefVern = defaultVernacularWs; m_wsDefAnal = defaultAnalysisWs; m_proj = proj; }
private LineOption[] LineOptions(InterlinMode mode) { return(new LineOption[] { new LineOption(kflidWord, ITextStrings.ksWord), new LineOption(kflidMorphemes, ITextStrings.ksMorphemes), new LineOption(kflidLexEntries, ITextStrings.ksLexEntries), new LineOption(kflidLexGloss, ITextStrings.ksGloss), new LineOption(kflidLexPos, ITextStrings.ksGramInfo), new LineOption(kflidWordGloss, mode == InterlinMode.GlossAddWordsToLexicon ? ITextStrings.ksLexWordGloss : ITextStrings.ksWordGloss), new LineOption(kflidWordPos, mode == InterlinMode.GlossAddWordsToLexicon ? ITextStrings.ksLexWordCat : ITextStrings.ksWordCat), new LineOption(kflidFreeTrans, ITextStrings.ksFreeTranslation), new LineOption(kflidLitTrans, ITextStrings.ksLiteralTranslation), new LineOption(kflidNote, ITextStrings.ksNote) }); }
public InterlinLineChoices(ILangProject proj, int defaultVernacularWs, int defaultAnalysisWs, InterlinMode mode) : this(proj.Cache, defaultVernacularWs, defaultAnalysisWs, mode) { m_proj = proj; // Not used any more. TODO: remove, and modify callers. }
private LineOption[] LineOptions(InterlinMode mode) { return new LineOption[] { new LineOption(kflidWord, ITextStrings.ksWord), new LineOption(kflidMorphemes, ITextStrings.ksMorphemes), new LineOption(kflidLexEntries, ITextStrings.ksLexEntries), new LineOption(kflidLexGloss, ITextStrings.ksGloss), new LineOption(kflidLexPos, ITextStrings.ksGramInfo), new LineOption(kflidWordGloss, mode == InterlinMode.GlossAddWordsToLexicon ? ITextStrings.ksLexWordGloss : ITextStrings.ksWordGloss), new LineOption(kflidWordPos, mode == InterlinMode.GlossAddWordsToLexicon ? ITextStrings.ksLexWordCat : ITextStrings.ksWordCat), new LineOption(kflidFreeTrans, ITextStrings.ksFreeTranslation), new LineOption(kflidLitTrans, ITextStrings.ksLiteralTranslation), new LineOption(kflidNote, ITextStrings.ksNote) }; }
private void InitFieldNames(InterlinMode mode) { LineOption[] options = LineOptions(mode); m_fieldNames.Clear(); foreach (LineOption opt in options) m_fieldNames[opt.Flid] = opt.ToString(); }
public static InterlinLineChoices DefaultChoices(ILangProject proj, int vern, int analysis, InterlinMode mode) { InterlinLineChoices result = new InterlinLineChoices(proj, vern, analysis, mode); switch (mode) { case InterlinMode.Analyze: result.SetStandardState(); break; case InterlinMode.Gloss: case InterlinMode.GlossAddWordsToLexicon: result.SetStandardGlossState(); break; } return result; }
public InterlinLineChoices(int defaultVernacularWs, int defaultAnalysisWs, ILangProject proj, InterlinMode mode) { this.Mode = mode; InitFieldNames(mode); if (defaultVernacularWs == 0) { m_wsDefVern = LangProject.kwsVernInParagraph; } else { m_wsDefVern = defaultVernacularWs; } m_wsDefAnal = defaultAnalysisWs; m_proj = proj; }
public static InterlinLineChoices DefaultChoices(int vern, int analysis, ILangProject proj, InterlinMode mode) { InterlinLineChoices result = new InterlinLineChoices(vern, analysis, proj, mode); switch (mode) { case InterlinMode.Analyze: result.SetStandardState(); break; case InterlinMode.Gloss: case InterlinMode.GlossAddWordsToLexicon: result.SetStandardGlossState(); break; } return(result); }