private void btnStart_Click(object sender, EventArgs e) { Form lvlSelecet = new LevelSelectScreen(this, startupConfig); lvlSelecet.FormClosing += delegate { this.Close(); }; hideForm(); lvlSelecet.Show(); }
public GameScreen(Level lvl, LevelSelectScreen lss) { InitializeComponent(); grap = this.CreateGraphics(); formSize = this.getSize(); this.lvl = lvl; this.lss = lss; this.startupConfig = Config.deserializeConfig(Config.confFilePath); DoubleBuffered = true; firstStartForBall = true; timer = new Timer(); timer.Interval = 50; timer.Tick += new EventHandler(timer_Tick); leftX = 1; topY = dynamicHeigth; this.Width = startupConfig.width + 18; this.Height = startupConfig.height + 18; width = startupConfig.width; height = this.Height - (int)(2.5 * topY); }