예제 #1
0
        private void btnAddParameter_Click(object sender, EventArgs e)
        {
            ParameterForm addForm = new ParameterForm(this._model);

            if (addForm.ShowDialog() == DialogResult.OK)
            {
                this.UpdateParametersDataGrid();
            }
            addForm.Dispose();
        }
예제 #2
0
        private void btnEditParameter_Click(object sender, EventArgs e)
        {
            if (this.dgvParameters.SelectedRows.Count == 0 ||
                this.dgvParameters.SelectedRows.Count > 1)
            {
                MessageBoxHelper.ShowExclamation("Выберите в списке только один оптимизируемый параметр для редактирования");
                return;
            }

            TId           index    = (TId)this.dgvParameters.SelectedRows[0].Cells[0].Value;
            ParameterForm editForm = new ParameterForm(this._model, index);

            if (editForm.ShowDialog() == DialogResult.OK)
            {
                this.UpdateParametersDataGrid();
                SelectDataGridRow((index));
            }
            editForm.Dispose();
        }