/// <summary> /// Executes the generation of a help project on the console. /// </summary> private void GenerateOnConsole() { // User interface that will log to the console: ConsoleUserInterface ui = new ConsoleUserInterface(); ui.LogLevel = logLevel; try { ChmProject project = ChmProject.Open(projectFile); DocumentProcessor processor = new DocumentProcessor(project); processor.UI = ui; processor.GenerateHelp(); ui.log("DONE!", 1); } catch (Exception ex) { ui.log(ex); ui.log("Failed", 1); } }
public GenerationDialog(ChmProject project, bool exitAfterEnd, bool askConfirmations, int LogLevel) { InitializeComponent(); this.project = project; this.exitAfterEnd = exitAfterEnd; this.askConfirmations = askConfirmations; this.UI = new GenerationDialogUserInterface(this); this.UI.LogLevel = LogLevel; this.processor = new DocumentProcessor(project); this.processor.UI = UI; bgWorker.RunWorkerAsync(); }