private void button1_Click(object sender, EventArgs e) { if (!Directory.Exists(textBoxOutputFolder.Text)) { MessageBox.Show(@"Please select a valid output folder first", @"", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); return; } toolStripStatusLabel1.Text = @"Composing Code..."; var dslCode = LibraryComposerFactory.GMacDslCodeList[comboBoxGMacDslCode.SelectedIndex]; var filesComposer = LibraryComposerFactory.ComposeLibrary( dslCode, textBoxOutputFolder.Text, checkBoxGenerateMacroCode.Checked, comboBoxTargetLanguage.Text ); toolStripStatusLabel1.Text = @"Ready"; if (filesComposer == null) { return; } //MessageBox.Show(@"Target code files saved successfully", @"Files Saved", MessageBoxButtons.OK, MessageBoxIcon.Information); //Show final generated files and read their contents from disk var formFiles = new FormFilesComposer(filesComposer); formFiles.ShowDialog(this); }
private void BeginCodeGeneration(GMacCodeLibraryComposer libGen) { var formProgress = new FormProgress(libGen.Progress, libGen.Generate, null); formProgress.ShowDialog(this); var formFiles = new FormFilesComposer(libGen.CodeFilesComposer); formFiles.ShowDialog(this); }