/// <summary> /// Toggle the image demo /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void buttonImageDemo_Click(object sender, EventArgs e) { if (_imageDemo == null) { _imageDemo = new ImageDemo(_touchlessMgr, pictureBoxDisplay.Bounds); buttonImageDemo.Text = "Stop Image Demo"; buttonDrawDemo.Enabled = buttonSnakeDemo.Enabled = buttonDefendDemo.Enabled = false; labelDemoInstructions.Enabled = true; labelDemoInstructions.Text = "Image Demo Instructions:\n\n" + "Use one or two markers to control an image.\n\n" + "With one marker:\n" + " Control zoom in the center area with the marker size.\n" + " Move the marker outside the center area to pan.\n\n" + "With two markers:\n" + " The first marker is the lower left corner of the image.\n" + " The second marker is the upper right corner of the image.\n" + " Move the markers around together or independently.\n\n" + "Can you make a more intuitive way to control an image?\n" + "Can you implment arbitrary two-point transformations?\n" + "Can you extend the controls to work with multiple images?\n" + "Give feedback, submit code, join the community, and more:\n" + "http://www.codeplex.com/touchless"; } else { _imageDemo.Dispose(); _imageDemo = null; buttonImageDemo.Text = "Start Image Demo"; buttonDrawDemo.Enabled = buttonSnakeDemo.Enabled = buttonDefendDemo.Enabled = true; labelDemoInstructions.Enabled = false; labelDemoInstructions.Text = ""; } }