private void IndividualMatrixRadioButton_CheckedChanged(object sender, EventArgs e) { // If individialMatrixRadioButton is checked if (IndividualMatrixRadioButton.Checked) { // If MatrixDataGridView isn't clear if (MatrixDataGridView.GetCellCount(DataGridViewElementStates.Displayed) != 0) { ColumnsTextBox.Text = MatrixClass.COUNT_COLUMNS.ToString(); RowsTextBox.Text = MatrixClass.COUNT_ROWS.ToString(); } // ... is clear else { ColumnsTextBox.Text = COUNT_ROW_COL_DEFAULT.ToString(); RowsTextBox.Text = COUNT_ROW_COL_DEFAULT.ToString(); } // Set visible group boxes ColRowGroupBox.Visible = true; ResultGroupBox.Visible = false; } else { // Set visible group boxes ColRowGroupBox.Visible = false; ResultGroupBox.Visible = true; individualMatrix = null; } }
private void ProcessButton_Click(object sender, EventArgs e) { if (MatrixDataGridView.GetCellCount(DataGridViewElementStates.Displayed) == 0) { MessageBox.Show("Matrix isn't builded. Correct it and try again!"); return; } if (BaseMatrixRadioButton.Checked) { ProcessBaseMatrix(); } else { ProcessIndividualMatrix(); } }