/// <summary> /// Handles the CellContentClick event of the dgvSteps control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="DataGridViewCellEventArgs" /> instance containing the event data.</param> private void dgvSteps_CellContentClick(object sender, DataGridViewCellEventArgs e) { DataGridView dgv = sender as DataGridView; if (dgv.Columns[e.ColumnIndex].HeaderText.Equals("Result Detail", StringComparison.InvariantCultureIgnoreCase) && dgv.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString().Equals("View Details", StringComparison.InvariantCultureIgnoreCase)) { Step step = dgv.Rows[e.RowIndex].DataBoundItem as Step; StepDetailViewer stepDetailViewer = new StepDetailViewer(); stepDetailViewer.Step = step; stepDetailViewer.Show(this); } else if (dgv.Columns[e.ColumnIndex].HeaderText.Equals("Configuration", StringComparison.InvariantCultureIgnoreCase) && dgv.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString().Equals("Change Configuration", StringComparison.InvariantCultureIgnoreCase)) { Step step = dgv.Rows[e.RowIndex].DataBoundItem as Step; StepSettingsForm stepSettingsForm = new StepSettingsForm(step); stepSettingsForm.Show(this); } else if (dgv.Columns[e.ColumnIndex].HeaderText.Equals("Deploy Sequence", StringComparison.InvariantCultureIgnoreCase) && string.Equals(dgv.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString(), "Edit", StringComparison.InvariantCultureIgnoreCase)) { Step step = dgv.Rows[e.RowIndex].DataBoundItem as Step; ObjectEditor deploySequenceConfiguration = new ObjectEditor(); deploySequenceConfiguration.PropertyGrid.SelectedObject = new { DeploySequence = step.DeploySequence }; deploySequenceConfiguration.Show(this); } }
private void commonSettingsCToolStripMenuItem_Click(object sender, EventArgs e) { Step step = new CommonStep() { Checked = false, Status = StepStatusEnum.NotExecutable }; StepSettingsForm stepSettingsForm = new StepSettingsForm(step); stepSettingsForm.Show(this); }