import com.ms.wfc.app.*;
import com.ms.wfc.core.*;
import com.ms.wfc.ui.*;
import com.ms.wfc.html.*;

/**
 * This class can take a variable number of parameters on the command
 * line. Program execution begins with the main() method. The class
 * constructor is not invoked unless an object of type 'HelpDialog'
 * created in the main() method.
 */
public class HelpDialog extends Form
{
	public HelpDialog()
	{
		super();

		// Required for Visual J++ Form Designer support
		initForm();		

		// TODO: Add any constructor code after initForm call
	}

	/**
	 * HelpDialog overrides dispose so it can clean up the
	 * component list.
	 */
	public void dispose()
	{
		super.dispose();
		components.dispose();
	}

	private void HelpDialog_keyPress(Object source, KeyPressEvent e)
	{
		if(e.keyChar == Key.ESCAPE) 
		{
			this.setDialogResult(DialogResult.OK);
		}
	}

	/**
	 * NOTE: The following code is required by the Visual J++ form
	 * designer.  It can be modified using the form editor.  Do not
	 * modify it using the code editor.
	 */
	Container components = new Container();
	PictureBox pictureBox1 = new PictureBox();

	private void initForm()
	{
		// NOTE:  This form is storing resource information in an
		// external file.  Do not modify the string parameter to any
		// resources.getObject() function call. For example, do not
		// modify "foo1_location" in the following line of code
		// even if the name of the Foo object changes: 
		//   foo1.setLocation((Point)resources.getObject("foo1_location"));

		IResourceManager resources = new ResourceManager(this, "HelpDialog");
		this.setText("HelpDialog");
		this.setAutoScaleBaseSize(new Point(5, 13));
		this.setBorderStyle(FormBorderStyle.NONE);
		this.setClientSize(new Point(787, 613));
		this.setKeyPreview(true);
		this.setStartPosition(FormStartPosition.CENTER_SCREEN);
		this.addOnKeyPress(new KeyPressEventHandler(this.HelpDialog_keyPress));

		pictureBox1.setSize(new Point(799, 614));
		pictureBox1.setTabIndex(0);
		pictureBox1.setTabStop(false);
		pictureBox1.setText("pictureBox1");
		pictureBox1.setImage((Bitmap)resources.getObject("pictureBox1_image"));
		pictureBox1.setSizeMode(PictureBoxSizeMode.AUTO_SIZE);

		this.setNewControls(new Control[] {
							pictureBox1});
	}

	/**
	 * The main entry point for the application. 
	 *
	 * @param args Array of parameters passed to the application
	 * via the command line.
	 */
	public static void main(String args[])
	{
		Application.run(new HelpDialog());
	}
}
