Ejemplo n.º 1
0
        private void toolStripMenuItem2_Click(object sender, EventArgs e)
        {
            ExportChmForm ecf = new ExportChmForm();

            if (ecf.ShowDialog() != DialogResult.OK)
            {
                return;
            }

            appController.CreateChm(ecf.ChmFileTextBox.Text, ecf.TitleTextBox.Text,
                                    tocLocale, ContentDataSet);
        }
Ejemplo n.º 2
0
        private void exportToChmFileToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (ContentDataSet.Tables["Item"].Rows.Count == 0)
                return;

            //Test if HH Workshop installed
            string key = @"HKEY_CURRENT_USER\Software\Microsoft\HTML Help Workshop";
            string install = (string)Registry.GetValue(key, "InstallDir", null);
            string hhcExe =  Path.Combine(install, "hhc.exe");
            if (install == null || File.Exists(hhcExe) == false)
            {
                MessageBox.Show("Please install the HTML Help Workshop.",
                    "Warning", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                return;
            }

            ExportChmForm frm = new ExportChmForm();

            if (frm.ShowDialog() != DialogResult.OK)
                return;

            appController.CreateChm(frm.ChmFileTextBox.Text, frm.TitleTextBox.Text,
                currentLocale, ContentDataSet);

            //Show the output folder
            ShowFileinExplorer(frm.ChmFileTextBox.Text);
        }