///------------------------------------------------------------------------------- /// <summary> /// Constructor for import dialog, requiring a language project. /// Use this constructor at run time. /// </summary> ///------------------------------------------------------------------------------- public ImportDialog(FwStyleSheet styleSheet, FdoCache cache, ScrImportSet settings, string helpFile) : this() { m_StyleSheet = styleSheet; m_cache = cache; Scripture scr = (Scripture)cache.LangProject.TranslatedScriptureOA; m_importSettings = settings; m_helpFile = helpFile; //InitBookNameList(); // Set the initial values for the controls from the static variables. radImportEntire.Checked = ImportEntire; radImportRange.Checked = !ImportEntire; chkTranslation.Checked = ImportTranslation; chkBackTranslation.Checked = ImportBackTranslation; chkBookIntros.Checked = ImportBookIntros; chkOther.Checked = ImportAnnotations; // Restore any saved settings. if (s_StartRef.ContainsKey(m_cache)) { StartRef = s_StartRef[m_cache]; } else { SetStartRefToFirstImportableBook(); } if (s_EndRef.ContainsKey(m_cache)) { EndRef = s_EndRef[m_cache]; } else { SetEndRefToLastImportableBook(); } // Finish constructing the ScrBookControl objects. Paratext.ScrVers versification = scr.Versification; scrPsgFrom.Initialize(new ScrReference(StartRef, versification), scr, m_importSettings.BooksForProject.ToArray()); scrPsgTo.Initialize(new ScrReference(EndRef, versification), scr, m_importSettings.BooksForProject.ToArray()); }