private void TabControl1_Selecting(object sender, TabControlCancelEventArgs e)
{
using(AdvancedMessageBox advbox = new AdvancedMessageBox("Are you sure you want to cancel current operation?", ReportStatus.Information, true))
{
if (DialogResult.OK == advbox.ShowDialog())
{
this.ResetTreeViewNodes(this.tvCheckList.Nodes["10"]);
this.ResetTreeViewNodes(this.tvCheckList.Nodes["20"]);
this.progressBar.Value = this.progressBar.Minimum;
this.btnViewBuildLog.Enabled = this.btnViewDeployLog.Enabled = this.btnViewTFLog.Enabled = false;
this.toolStripStatusLabel.Text = string.Empty;
this.rollbackVersionToLog = string.Empty;
this.pkgNameForLocalDeployment = string.Empty;
this.buildArgs = null;
switch (e.TabPageIndex)
{
case 0:
this.txtConfigPath.Text = this.txtPackagePath.Text = string.Empty;
break;
case 1:
this.cbxServerName.SelectedIndex = -1;
txtTFSLabelName.Text = txtTFSDefaultCollection.Text = txtSolutionName.Text = string.Empty;
btnLoadSolutions.Enabled = false;
this.btnLoadTFSlabel.Enabled = false;
break;
default:
break;
}
}
else
{
e.Cancel = true;
}
}
this.BringToFront();
}