private void BtnViewLog_Click(object sender, EventArgs e)
{
Button button = sender as Button;
if (button == null)
{
return;
}
string path = string.Empty;
switch (button.Name)
{
case "btnViewBuildLog":
path = this.msbuildLogPath;
break;
case "btnViewTFLog":
path = this.teamfoundationExeLogPath;
break;
case "btnViewDeployLog":
path = this.cloudDeploymentLogPath;
break;
}
if (string.IsNullOrEmpty(path))
{
// This case doesnot exist
return;
}
using (LogViewer viewer = new LogViewer(path))
{
viewer.ShowDialog(this);
}
}