/// <summary> /// View the output from the last build /// </summary> /// <param name="sender">The sender of the event</param> /// <param name="e">The event arguments</param> private void miViewOutput_Click(object sender, EventArgs e) { string lastBuildLog = null; if(outputWindow == null) { outputWindow = new OutputWindow(); outputWindow.Show(dockPanel); } if(project != null) { // Make sure we start out in the project's output folder // in case the output folder is relative to it. Directory.SetCurrentDirectory(Path.GetDirectoryName( Path.GetFullPath(project.Filename))); lastBuildLog = project.LogFileLocation; } if(sender == miViewLog) outputWindow.ViewLogFile(lastBuildLog); else { // Set the log file so that the user can switch to it if(!File.Exists(lastBuildLog)) outputWindow.LogFile = null; else outputWindow.LogFile = lastBuildLog; outputWindow.ViewBuildOutput(); } }
//===================================================================== /// <summary> /// Clear the last build information from the output window /// </summary> /// <param name="sender">The sender of the event</param> /// <param name="e">The event arguments</param> private void miClearOutput_Click(object sender, EventArgs e) { if(outputWindow != null) { if(sender == miClearOutput || sender == miBuildProject) outputWindow.Activate(); outputWindow.ResetLogViewer(); } else if(sender == miClearOutput || sender == miBuildProject) { outputWindow = new OutputWindow(); outputWindow.Show(dockPanel); } }