/// ------------------------------------------------------------------------------------
        /// <summary>
        /// Loads the specified file.
        /// </summary>
        /// <param name="filename">The name of the OXEKT file.</param>
        /// <param name="cache">The cache.</param>
        /// <param name="ResolveConflict">The delegate to call to resolve a conflict when a
        /// different rendering already exists.</param>
        /// <param name="e">Exception that was encountered or null</param>
        /// <returns>A loaded XmlTermRenderingsList</returns>
        /// ------------------------------------------------------------------------------------
        public static XmlTermRenderingsList LoadFromFile(string filename, FdoCache cache,
                                                         Func <IChkRef, string, string, bool> ResolveConflict, out Exception e)
        {
            XmlTermRenderingsList list =
                XmlSerializationHelper.DeserializeFromFile <XmlTermRenderingsList>(filename, true, out e);

            if (cache != null && list != null)
            {
                list.WriteToCache(cache, ResolveConflict ?? ((occ, existing, imported) => { return(false); }));
            }

            return(list ?? new XmlTermRenderingsList());
        }
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Export Key Terms menu handler
		/// </summary>
		/// ------------------------------------------------------------------------------------
		protected bool OnFileExportKeyTerms(object args)
		{
			FilteredScrBooks filteredScrBooks = m_cache.ServiceLocator.GetInstance<IFilteredScrBookRepository>().GetFilterInstance(
				m_bookFilterInstance);

			int defaultBook = (SelectedReference.ChkRef != null) ?
				BCVRef.GetBookFromBcv(SelectedReference.ChkRef.Ref) : 0;
			using (ExportXmlDialog dlg = new ExportXmlDialog(m_cache, filteredScrBooks, defaultBook,
				m_stylesheet, FileType.OXEKT, m_helpTopicProvider))
			{
				if (dlg.ShowDialog() == DialogResult.OK)
				{
					XmlTermRenderingsList terms = new XmlTermRenderingsList(m_cache.LangProject);
					terms.SerializeToFile(dlg.FileName);
					MessageBox.Show(Properties.Resources.kstidOxektExportCompleteMsg,
						Properties.Resources.kstidOxektExportTitle, MessageBoxButtons.OK);
				}
			}
			return true;
		}