Exemplo n.º 1
0
        /// <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);
            }
        }
Exemplo n.º 2
0
        private void btnEditPrepareSteps_Click(object sender, EventArgs e)
        {
            ObjectEditor stepsEditor = new ObjectEditor();

            stepsEditor.PropertyGrid.SelectedObject = new { Steps = this.prepareSteps };
            stepsEditor.Show(this);
        }