void mainForm_StartEvent(object sender, EventArgs e) { g.FillRectangle(space, 0, 0, myForm.pictureBox1.Width, myForm.pictureBox1.Height); this.cellsField = new CellsField(); this.myForm.timer1.Enabled = true; drawWorld(); }
void mainForm_CustomStartEvent(object sender, EventArgs e) { if (!myForm.timer1.Enabled) { g.FillRectangle(space, 0, 0, myForm.pictureBox1.Width, myForm.pictureBox1.Height); cellsField = new CellsField(prevSituation); this.myForm.timer1.Enabled = true; drawWorld(); } else { myForm.timer1.Enabled = false; prevSituation = cellsField.Field; } }