private void nextWaveCB_CheckedChanged(object sender, EventArgs e) { if (nextWaveCB.Checked) { imageFormNext = new ImageForm(nextWaveCB); imageFormNext.Show(); int index = parser.wave + (drawHalfsCB.Checked ? 1 : 0); if (parser.inBrawl) { imageFormNext.updateImage(ImageDrawer.createImage(Resources.map_small, waves[index], waves[index + 1], drawHalfsCB.Checked)); } } else { if (imageFormNext == null) { return; } imageFormNext.Close(); } }