/// ------------------------------------------------------------------------------------ /// <summary> /// Loads the given BiblicalTermsList. This is the version that gets called when opening /// an existing project if the resource version number doesn't match. /// </summary> /// <param name="progressDlg">Progress dialog so the user can cancel</param> /// <param name="parameters">Only parameter is the class that holds the key terms info. /// </param> /// ------------------------------------------------------------------------------------ protected object CreateKeyTerms(IProgress progressDlg, params object[] parameters) { Debug.Assert(parameters.Length == 1); ICmPossibilityList ktList = m_scr.Cache.LangProject.KeyTermsList; Debug.Assert(ktList.PossibilitiesOS.Count > 0, "I (TomB) doubt it really matters if this fails (though it's never been tried), but theoretically I think this should never happen since all released versions of TE have had key terms. If this assertion fails, check to make sure the biblical terms list was created correctly and try to figure out how this DB came into existence."); ICmPossibilityList tempList = m_scr.Cache.ServiceLocator.GetInstance <ICmPossibilityListFactory>().Create(); m_scr.Cache.LangProject.CheckListsOC.Add(tempList); // Copy terms from previous list into the new list. foreach (ICmPossibility poss in ktList.PossibilitiesOS) { tempList.PossibilitiesOS.Add(poss); } LoadKeyTerms(progressDlg, tempList, ktList, (BiblicalTermsList)parameters[0]); tempList.Delete(); Debug.Assert(!m_servLoc.GetInstance <IChkTermRepository>().AllInstances().Any(t => t.TermId == 0)); return(null); }