/// <summary> /// This function shows the "StartUp" form that allows the user to select the starting dimensions /// </summary> /// <returns></returns> public bool ShowStartupForm() { StartupForm StartupDialog = new StartupForm(); var result = StartupDialog.ShowDialog(); if (result == DialogResult.OK) { col = StartupDialog.StartupColumns; row = StartupDialog.StartupRows; cellArray = new Cell[col, row]; return(true); } return(false); }
/// <summary> /// When user clicks on the grid dimensions option, a form pops up. In this form, the user sets the /// new grid dimensions. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void gridDimensionsToolStripMenuItem_Click(object sender, EventArgs e) { StartupForm StartupDialog = new StartupForm(); var result = StartupDialog.ShowDialog(); if (result == DialogResult.OK) { col = StartupDialog.StartupColumns; row = StartupDialog.StartupRows; cellArray = new Cell[col, row]; } SetCell(); this.generationCounter = 0; this.generationLabel.Text = "Generation Label: 0"; this.generationTimer.Stop(); Invalidate(); }