private void toolStripMenuItemToolsModule_Click(object sender, EventArgs e)
{
if(this.saveFileDialogModule.ShowDialog(this) == System.Windows.Forms.DialogResult.OK)
{
// prompt for model view
using(FormSelectView form = new FormSelectView(this.m_project, "Select an optional Model View for generating validation rules and a schema subset, or none to support all definitions."))
{
if(form.ShowDialog(this) == System.Windows.Forms.DialogResult.OK)
{
Compiler compiler = new Compiler(this.m_project, form.Selection, null);
System.Reflection.Emit.AssemblyBuilder ab = compiler.Assembly;
ab.Save("IFC4.dll");
if(System.IO.File.Exists(this.saveFileDialogModule.FileName))
{
System.IO.File.Delete(this.saveFileDialogModule.FileName);
}
System.IO.File.Move(compiler.Module.FullyQualifiedName, this.saveFileDialogModule.FileName);
}
}
}
}