Beispiel #1
0
        private void BuildRenderings(string strProjectFolder, string termId)
        {
            termRenderingsList = new List <TermRendering>();
            int projectNum = 0;

            for (int i = 0; i < scrTextNames.Count; i++)
            {
                string name = scrTextNames[i];

                /* until we have a "TermRenderingsList" xml file for this project, we can't use this feature
                 * the BiblicalTermsEn.xml in the BiblicalTerms folder is *not* one of these and won't work.
                 * string strPath = strProjectFolder;
                 * if (i > 0)
                 *      strPath = BiblicalTermsList.DefaultBiblicalTermsFileFolder;
                 */
                TermRenderingsList termRenderings = TermRenderingsList.GetTermRenderings(strProjectFolder, name);
                TermRendering      termRendering  = termRenderings.GetRendering(termId);
                termRenderingsList.Add(termRendering);

                string val = termRendering.Renderings;
                val += FormattedNotes(termRendering);

                projectVariablesList[projectNum]["Renderings"] = val;

                ++projectNum;
            }
        }
        internal object GetCellValue(int columnIndex, Term term)
        {
            TermRendering termRendering;

            switch (columnIndex)
            {
            case CnColumnKeyTermLemma:
                return(term.Transliteration);

            case CnColumnStatus:
            {
                termRendering = renderings.GetRendering(term.Id);
                BiblicalTermStatus status = termRendering.Status;

                if (status == BiblicalTermStatus.AllFound)
                {
                    return(checkMark);                                       // Check mark
                }
                if (status == BiblicalTermStatus.AllFoundOrDenied)
                {
                    return(checkMarkX);                                       // Check mark + x
                }
                return(" ");
            }

            case CnColumnEnglishGloss:
                return(term.Gloss);

            /*
             * case CnColumnNationalGloss:
             * {
             *      Localization loc = termLocalizations.GetTermLocalization(term.Id);
             *      return loc.Gloss;  // term.LocalGloss;
             * }
             */
            case CnColumnRenderings:
                termRendering = renderings.GetRendering(term.Id);
                return(termRendering.Renderings);

            default:
                System.Diagnostics.Debug.Assert(false);
                break;
            }

            return("");
        }