private void OutputSolve(Brainteaser parTask) { CreateSolveField(); for (int j = 0; j < _RowCount + 2; j++) { for (int i = 0; i < _ColCount + 2; i++) { if ((object)parTask.Field[i, j] != null) { dataGridViewField.Rows[j + _RowCount + 2].Cells[i].Value = parTask.Field[i, j].Image; } } } }
private void buttonDepthSolve_Click(object sender, EventArgs e) { Pipe[,] testField = GetCopeField(); Brainteaser br = new Brainteaser(testField, _ColCount, _RowCount, _Enter, _Exit); bool complete = br.DepthSolve(); OutputSolve(br); if (complete) { MessageBox.Show("Решено"); } else { MessageBox.Show("Не решено"); } }
private void OutputSolve(Brainteaser parTask) { CreateSolveField(); for (int j = 0; j < _RowCount + 2; j++) { for (int i = 0; i < _ColCount + 2; i++) { if ((object)parTask.Field[i, j] != null) { dataGridViewField.Rows[j+_RowCount + 2].Cells[i].Value = parTask.Field[i, j].Image; } } } }