/// <summary> /// Обработчик нажатия кнопки "Задержка" /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void ToolStrip_timebtn_Click(object sender, EventArgs e) { TimeForm time = new TimeForm(); time.FormClosing += (sender1, e1) => { if (time.GetTimeVal() > 0) //if nothing_changed; { GenerationTimer.Interval = time.GetTimeVal(); ToolStrip_timebtn.Text = DELAY + GenerationTimer.Interval; paint(Cells); } }; time.ShowDialog(); }