private void radioBtn32_CheckedChanged(object sender, EventArgs e) // Якщо розмір поля було змінено то ... { if (radioBtn16.Checked) { if (!CheckEmptyArt()) { QuestionForm qf = new QuestionForm(); if (qf.ShowDialog() == DialogResult.OK) { CallFunction = false; сохранитьToolStripMenuItem_Click(sender, e); CallFunction = true; Field.Controls.Clear(); LoadMap(); } else if (qf.DialogResult == DialogResult.Ignore) { Field.Controls.Clear(); LoadMap(); } } else { Field.Controls.Clear(); LoadMap(); } } if (radioBtn32.Checked) { if (!CheckEmptyArt()) { QuestionForm qf = new QuestionForm(); if (qf.ShowDialog() == DialogResult.OK) { CallFunction = false; сохранитьToolStripMenuItem_Click(sender, e); CallFunction = true; Field.Controls.Clear(); LoadMap(); } else if (qf.DialogResult == DialogResult.Ignore) { Field.Controls.Clear(); LoadMap(); } } else { Field.Controls.Clear(); LoadMap(); } } }
private void создатьToolStripMenuItem_Click(object sender, EventArgs e) { if (!CheckEmptyArt()) { QuestionForm qf = new QuestionForm(); if (qf.ShowDialog() == DialogResult.OK) { сохранитьToolStripMenuItem_Click(sender, e); Field.Controls.Clear(); LoadMap(); } else if (qf.DialogResult == DialogResult.Ignore) { Field.Controls.Clear(); LoadMap(); } } else { Field.Controls.Clear(); LoadMap(); } }