private void buttonDefendDemo_Click(object sender, EventArgs e) { if (_defendDemo == null) { if (_touchlessMgr.MarkerCount < 2) { MessageBox.Show("Defend Demo requires two markers.", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning); } else { _defendDemo = new DefendDemo(_touchlessMgr, pictureBoxDisplay.Bounds); buttonDefendDemo.Text = "Stop Defend Demo"; buttonDrawDemo.Enabled = buttonSnakeDemo.Enabled = buttonImageDemo.Enabled = false; labelDemoInstructions.Enabled = true; labelDemoInstructions.Text = "Defend Demo Instructions:\n\n" + "Use two-four markers to control this classic arcade remake.\n" + "Each player must defend their image edge with a paddle.\n" + "The circle attached to the paddle is the marker position.\n" + "If a marker isn't found, the game slows down; it's a feature!\n\n" + "Each time the puck hits a paddle it moves a little faster.\n" + "The last player to hit the puck before a goal gets a point.\n\n" + "Try playing with up to three other people!\n" + "Try using two markers yourself!\n\n" + "Can you make the collisions more realisitic?\n" + "Can you improve the gameplay?\n" + "Can you remake other classic games or invent a new game?\n" + "Our SDK isn't tied to Windows Forms, use XNA and more.\n\n" + "Give feedback, submit code, join the community, and more:\n" + "http://www.codeplex.com/touchless"; } } else { _defendDemo.Dispose(); _defendDemo = null; buttonDefendDemo.Text = "Start Defend Demo"; buttonDrawDemo.Enabled = buttonSnakeDemo.Enabled = buttonImageDemo.Enabled = true; labelDemoInstructions.Enabled = false; labelDemoInstructions.Text = ""; } }