private void ПодсказкаToolStripMenuItem_Click(object sender, EventArgs e) { Hint hint = new Hint(this); foreach (var item in list) { hint.AddQuestion(item); } if (hint.ShowDialog() == DialogResult.OK) { int w; switch (BuyedWord) { case 1: w = 2; for (int i = 0; i < 16; i++) { dataGridView1.Rows[i + 1].Cells[9 + 2].Value = crossword[w][i]; } Remove(1); break; case 2: w = 9; for (int i = 0; i < 4; i++) { dataGridView1.Rows[20].Cells[i + 10].Value = crossword[w][i]; } Remove(2); break; case 3: w = 5; for (int i = 0; i < 4; i++) { dataGridView1.Rows[i + 18].Cells[8 + 2].Value = crossword[w][i]; } Remove(3); break; case 4: w = 6; for (int i = 0; i < 5; i++) { dataGridView1.Rows[6].Cells[i + 14].Value = crossword[w][i]; } Remove(4); break; case 5: w = 7; for (int i = 0; i < 21; i++) { dataGridView1.Rows[10].Cells[i + 2].Value = crossword[w][i]; } Remove(5); break; case 6: w = 0; for (int i = 0; i < 19; i++) { dataGridView1.Rows[i + 2 + 1].Cells[2].Value = crossword[w][i]; } Remove(6); break; case 7: w = 8; for (int i = 0; i < 10; i++) { dataGridView1.Rows[12].Cells[i + 13].Value = crossword[w][i]; } Remove(7); break; case 8: w = 4; for (int i = 0; i < 12; i++) { dataGridView1.Rows[i + 11 + 1].Cells[11 + 2].Value = crossword[w][i]; } Remove(8); break; case 9: w = 1; for (int i = 0; i < 9; i++) { dataGridView1.Rows[i + 8 + 1].Cells[6 + 2].Value = crossword[w][i]; } Remove(9); break; case 10: w = 3; for (int i = 0; i < 8; i++) { dataGridView1.Rows[i + 4 + 1].Cells[13 + 2].Value = crossword[w][i]; } Remove(10); break; default: return; } prav++; VvodBlock(w); Player.Inventory.Money -= 10; if (prav == crossword.Count()) { MessageBox.Show("Все отгадано"); Game.NextMap3 = true; this.Dispose(); //Закрытие формы } return; } }