using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;

namespace MyNamespace
{
	/// <summary>
	///		General purpose AboutForm.
	///
	/// ---------------- *** LEGAL NOTICE: *** ------------------
	///
	/// This program is free software; you can redistribute it and/or modify
	/// it under the terms of the GNU General Public License (GPL) as published
	/// by the Free Software Foundation. cf. the file COPYING.txt.
	///
	/// ------------ *** end of legal notice *** ------------------
	/// </summary>

	public class AboutForm : Form
	{
		private Button buttonAboutOK;
		private GroupBox groupAbout;
		private PictureBox pictureBoxAbout;
		private Label labelAbout;
		private LinkLabel linkLabelAbout;
		/// <summary>
		/// Required designer variable.
		/// </summary>
		private System.ComponentModel.Container components = null;

		public AboutForm()
		{
			InitializeComponent();

			this.Text = Global.title + " - About";
			this.linkLabelAbout.Text = Global.programURL;
			this.labelAbout.Text =	Global.name1	+ "\n" +
									Global.name2	+ "\n" +
									Global.version	+ "\n" +
									Global.author	+ "\n" +
									Global.address;
		}

		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if(components != null)
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}

		#region Windows Form Designer generated code
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{
			System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(AboutForm));
			this.buttonAboutOK = new Button();
			this.groupAbout = new GroupBox();
			this.linkLabelAbout = new LinkLabel();
			this.labelAbout = new Label();
			this.pictureBoxAbout = new PictureBox();
			this.groupAbout.SuspendLayout();
			this.SuspendLayout();
			// 
			// buttonAboutOK
			// 
			this.buttonAboutOK.DialogResult = DialogResult.Cancel;
			this.buttonAboutOK.Location = new System.Drawing.Point(360, 296);
			this.buttonAboutOK.Name = "buttonAboutOK";
			this.buttonAboutOK.TabIndex = 0;
			this.buttonAboutOK.Text = "OK";
			// 
			// groupAbout
			// 
			this.groupAbout.Controls.Add(this.linkLabelAbout);
			this.groupAbout.Controls.Add(this.labelAbout);
			this.groupAbout.Controls.Add(this.pictureBoxAbout);
			this.groupAbout.Location = new System.Drawing.Point(8, 16);
			this.groupAbout.Name = "groupAbout";
			this.groupAbout.Size = new System.Drawing.Size(704, 264);
			this.groupAbout.TabIndex = 1;
			this.groupAbout.TabStop = false;
			// 
			// linkLabelAbout
			// 
			this.linkLabelAbout.Location = new System.Drawing.Point(280, 184);
			this.linkLabelAbout.Name = "linkLabelAbout";
			this.linkLabelAbout.Size = new System.Drawing.Size(416, 48);
			this.linkLabelAbout.TabIndex = 2;
			this.linkLabelAbout.TabStop = true;
			this.linkLabelAbout.Text = "http://www.geocities.com/hjsmithh/";
			this.linkLabelAbout.LinkClicked += new LinkLabelLinkClickedEventHandler(this.linkLabelAbout_LinkClicked);
			// 
			// labelAbout
			// 
			this.labelAbout.Font = new System.Drawing.Font("Tahoma", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
			this.labelAbout.Location = new System.Drawing.Point(208, 32);
			this.labelAbout.Name = "labelAbout";
			this.labelAbout.Size = new System.Drawing.Size(488, 144);
			this.labelAbout.TabIndex = 1;
			this.labelAbout.Text = "name1 + name2 + version + author + address";
			// 
			// pictureBoxAbout
			// 
			this.pictureBoxAbout.Image = ((System.Drawing.Image)(resources.GetObject("pictureBoxAbout.Image")));
			this.pictureBoxAbout.Location = new System.Drawing.Point(8, 16);
			this.pictureBoxAbout.Name = "pictureBoxAbout";
			this.pictureBoxAbout.Size = new System.Drawing.Size(192, 240);
			this.pictureBoxAbout.TabIndex = 0;
			this.pictureBoxAbout.TabStop = false;
			// 
			// AboutForm
			// 
			this.AcceptButton = this.buttonAboutOK;
			this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
			this.BackColor = System.Drawing.SystemColors.ControlLight;
			this.CancelButton = this.buttonAboutOK;
			this.ClientSize = new System.Drawing.Size(722, 336);
			this.Controls.Add(this.groupAbout);
			this.Controls.Add(this.buttonAboutOK);
			this.FormBorderStyle = FormBorderStyle.FixedDialog;
			this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
			this.MaximizeBox = false;
			this.MinimizeBox = false;
			this.Name = "AboutForm";
			this.StartPosition = FormStartPosition.CenterScreen;
			this.Text = "<App.Title> - About";
			this.groupAbout.ResumeLayout(false);
			this.ResumeLayout(false);

		}
		#endregion

		private void linkLabelAbout_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
		{
			linkLabelAbout.LinkVisited = true;
			// call the Process.Start method to open the default browser with a URL:
			System.Diagnostics.Process.Start(Global.programURL);
		}
	}
}
