Esempio n. 1
0
 public WebPageGenerator(string destinationFolderName, WebPage webPage)
 {
     m_destinationFolderName = destinationFolderName;
     m_webPage = webPage;
 }
Esempio n. 2
0
        private void doGeneratePage()
        {
            //			if(!collectWidth())
            //			{
            //				return;
            //			}

            Cursor.Current = Cursors.WaitCursor;

            try
            {
                string templateName = templateComboBox.Text;

                WebPage webPage = new WebPage(templateName);

                webPage.imageWidth = width;
                webPage.imageHeight = height;

                webPage.shortName = new DirectoryInfo(Project.webPageDestinationFolder).Name;
                webPage.description = commentTextBox.Text;
                webPage.heading = headingTextBox.Text;

                webPage.init(commonDictionaryEditorControl.Dictionary, templateDictionaryEditorControl.Dictionary);

                WebPageGenerator webPageGenerator = new WebPageGenerator(Project.webPageDestinationFolder, webPage);

                webPageGenerator.generateAll(this.appendToMasterCheckBox.Checked);

                messageLabel.Text = "OK: web page saved";
                messageLabel.BackColor = Color.Yellow;

                m_indexFileFullPath = webPageGenerator.indexFileFullPath;

                previewButton.Enabled = m_indexFileFullPath.Length > 0;
            }
            catch(Exception ee)
            {
                messageLabel.Text = "Error: failed to generate web page";
                messageLabel.BackColor = Color.Red;
                LibSys.StatusBar.Error("failed to generate web page - " + ee);
            }
            Cursor.Current = Cursors.Default;
        }