static void Main() { var spaceForm = new SpaceForm(); Application.EnableVisualStyles(); //Application.SetCompatibleTextRenderingDefault(false); BackGround.InitBackground(spaceForm); spaceForm.Show(); BackGround.DrawBackground(); Application.Run(spaceForm); }
private void ExitToolStripMenuItem_Click(object sender, System.EventArgs e) { if (StatusStop) { Game.Timer.Dispose(); Game.Buffer.Dispose(); BackGround.InitBackground(this); BackGround.DrawBackground(); StatusStop = false; StatusGame = false; ExitToolStripMenuItem.Text = "Выход"; PauseToolStripMenuItem.Visible = false; StartToolStripMenuItem.Text = "Начать"; } else { BackGround.Timer.Dispose(); BackGround.Buffer.Dispose(); BackColor = Color.Aqua; StatusGame = false; } }