DeploymentTracker.App.Windows.PackageDeployment.BtnViewLog_Click C# (CSharp) Метод

BtnViewLog_Click() приватный Метод

Handles the Click event of the btnViewTFLog, btnViewDeployLog and btnViewBuildLog control.
private BtnViewLog_Click ( object sender, EventArgs e ) : void
sender object The source of the event.
e EventArgs The instance containing the event data.
Результат void
        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);
            }
        }