private void buttonGenerate_Click(object sender, EventArgs e) { MakefileGenerator generator = new MakefileGenerator(); string workspaceMakefileContent = generator.GenerateWorkspaceMakefileFromModel(m_model); string workspaceMakefilePath = this.textBoxWorkspacePath.Text + ".mak"; TextWriter workspaceWriter = new StreamWriter(new FileStream(workspaceMakefilePath, FileMode.Create), Encoding.ASCII); workspaceWriter.Write(workspaceMakefileContent); workspaceWriter.Close(); foreach (var project in m_model.Projects) { string projectMakefilePath = Path.GetDirectoryName(this.textBoxWorkspacePath.Text) + Path.DirectorySeparatorChar + project.Path + ".mak"; string projectMakefileContent = generator.GenerateProjectMakefileFromModel(project); TextWriter projectWriter = new StreamWriter(new FileStream(projectMakefilePath, FileMode.Create), Encoding.ASCII); projectWriter.Write(projectMakefileContent); projectWriter.Close(); } }
private void buttonGenerate_Click(object sender, EventArgs e) { MakefileGenerator generator = new MakefileGenerator(); string workspaceMakefileContent = generator.GenerateWorkspaceMakefileFromModel(m_model); string workspaceMakefilePath = this.textBoxWorkspacePath.Text + ".mak"; TextWriter workspaceWriter = new StreamWriter(new FileStream(workspaceMakefilePath, FileMode.Create), Encoding.ASCII); workspaceWriter.Write(workspaceMakefileContent); workspaceWriter.Close(); foreach (var project in m_model.Projects) { string projectMakefilePath = Path.GetDirectoryName(this.textBoxWorkspacePath.Text) + Path.DirectorySeparatorChar + project.Path + ".mak"; string projectMakefileContent = generator.GenerateProjectMakefileFromModel(project); TextWriter projectWriter = new StreamWriter(new FileStream(projectMakefilePath, FileMode.Create), Encoding.ASCII); projectWriter.Write(projectMakefileContent); projectWriter.Close(); } }