示例#1
0
 private void InitFieldNames(InterlinMode mode)
 {
     LineOption[] options = LineOptions(mode);
     m_fieldNames.Clear();
     foreach (LineOption opt in options)
     {
         m_fieldNames[opt.Flid] = opt.ToString();
     }
 }
示例#2
0
		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;
		}
示例#3
0
		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;
		}
示例#4
0
 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)
     });
 }
示例#5
0
		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.
		}
示例#6
0
		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)
			};
		}
示例#7
0
		private void InitFieldNames(InterlinMode mode)
		{
			LineOption[] options = LineOptions(mode);
			m_fieldNames.Clear();
			foreach (LineOption opt in options)
				m_fieldNames[opt.Flid] = opt.ToString();
		}
示例#8
0
		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;
		}
示例#9
0
 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;
 }
示例#10
0
        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);
        }