public static InterlinearExporter Create(string mode, FdoCache cache, XmlWriter writer, ICmObject objRoot, InterlinLineChoices lineChoices, InterlinVc vc) { if (mode != null && mode.ToLowerInvariant() == "elan") { return new InterlinearExporterForElan(cache, writer, objRoot, lineChoices, vc); } else { return new InterlinearExporter(cache, writer, objRoot, lineChoices, vc); } }
internal bool ExportPhase1(string mode, out InterlinearExporter exporter, string fileName) { CheckDisposed(); exporter = null; XmlWriter writer = new XmlTextWriter(fileName, System.Text.Encoding.UTF8); exporter = InterlinearExporter.Create(mode, m_cache, writer, m_hvos[0], m_vc.LineChoices, m_vc, m_tssTextName, m_tssTextAbbreviation); exporter.WriteBeginDocument(); exporter.ExportDisplay(); for (int i = 1; i < m_hvos.Count; ++i) { exporter.SetRootObject(m_hvos[i]); exporter.ExportDisplay(); } exporter.WriteEndDocument(); writer.Close(); return(true); }