public void DictionaryExportTest() { string inputSourceDirectory = FileInput("ExportXelatex"); string outputDirectory = FileOutput("ExportXelatex"); if (Directory.Exists(outputDirectory)) { Directory.Delete(outputDirectory, true); } FolderTree.Copy(inputSourceDirectory, outputDirectory); Param.LoadSettings(); _projInfo.ProjectPath = outputDirectory; _projInfo.ProjectInputType = "Dictionary"; _projInfo.DefaultXhtmlFileWithPath = Common.PathCombine(outputDirectory, "DictionaryInput.xhtml"); _projInfo.DefaultCssFileWithPath = Common.PathCombine(outputDirectory, "DictionaryInput.css"); EnableConfigurationSettings(outputDirectory); var target = new ExportXeLaTex(); const bool expectedResult = true; bool actual = target.Export(_projInfo); Assert.AreEqual(expectedResult, actual); }
private void btnXeLaTex_Click(object sender, EventArgs e) { //char c = '\u25C6'; //string hex = ((int)c).ToString("X4"); // Now hex = "0123" //string a = "\u25C6"; if (!File.Exists(txtInputPath.Text)) { MessageBox.Show("Please enter the valid XHTML path"); return; } if (!File.Exists(txtCSSInput.Text)) { MessageBox.Show("Please enter the valid CSS path"); return; } var exportXeLaTex = new ExportXeLaTex(); var projInfo = new PublicationInformation(); projInfo.ProjectPath = Path.GetDirectoryName(txtInputPath.Text); projInfo.DefaultXhtmlFileWithPath = txtInputPath.Text; projInfo.DefaultCssFileWithPath = txtCSSInput.Text; projInfo.ProjectInputType = radDictionary.Checked ? "Dictionary" : "Scripture"; projInfo.DefaultRevCssFileWithPath = txtCSSInput.Text.Replace("main", "flexrev"); if (projInfo.ProjectInputType.ToLower() == "dictionary") projInfo.IsReversalExist = true; projInfo.ProjectFileWithPath = projInfo.ProjectPath; projInfo.DictionaryPath = projInfo.ProjectPath; exportXeLaTex.Export(projInfo); }