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

namespace QCGM.Forms
{
	/// <summary>
	/// Summary description for Form3.
	/// </summary>
	public class AboutForm : System.Windows.Forms.Form
	{
		private System.Windows.Forms.LinkLabel linkLabel1;
		private System.Windows.Forms.TextBox textBox1;
		private System.Windows.Forms.Button button1;
		private System.Windows.Forms.Label label1;
		/// <summary>
		/// Required designer variable.
		/// </summary>
		private System.ComponentModel.Container components = null;

		public AboutForm()
		{
			//
			// Required for Windows Form Designer support
			//
			InitializeComponent();

			this.textBox1.BackColor = Color.White;
			this.textBox1.ForeColor = Color.Black;
			this.textBox1.Text = "Hello:\r\n\r\n" +
				"I wrote this project Spring 2004 as coursework for a computer science course at UAA.\r\n\r\n" +
				"It was written in C# using Microsoft Visual Studio .NET 2003. I found it to be a pretty good development environment.\r\n\r\n" +
				"Networking uses TCP/IP. This was my first project that used any kind of networking. Consequently, I learned a lot and would probably never think about implementing networking the way I did. In the future, for projects with frequently-updated states, I would use UDP over TCP.\r\n\r\n" +
				"Anyway, thanks for using my software!\r\n\r\n" +
				"  Kevin Dickerson\r\n" +
				"  kevind@uaa.alaska.edu\r\n\r\n\r\n\r\n" +
				"P.S. Thanks to everyone who helped write the Tao Framework!";
		}

		/// <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()
		{
			this.linkLabel1 = new System.Windows.Forms.LinkLabel();
			this.textBox1 = new System.Windows.Forms.TextBox();
			this.button1 = new System.Windows.Forms.Button();
			this.label1 = new System.Windows.Forms.Label();
			this.SuspendLayout();
			// 
			// linkLabel1
			// 
			this.linkLabel1.Location = new System.Drawing.Point(128, 264);
			this.linkLabel1.Name = "linkLabel1";
			this.linkLabel1.Size = new System.Drawing.Size(144, 23);
			this.linkLabel1.TabIndex = 1;
			this.linkLabel1.TabStop = true;
			this.linkLabel1.Text = "Click here to e-mail Kevin";
			this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked);
			// 
			// textBox1
			// 
			this.textBox1.Location = new System.Drawing.Point(8, 16);
			this.textBox1.Multiline = true;
			this.textBox1.Name = "textBox1";
			this.textBox1.ReadOnly = true;
			this.textBox1.Size = new System.Drawing.Size(384, 240);
			this.textBox1.TabIndex = 2;
			this.textBox1.Text = "text";
			// 
			// button1
			// 
			this.button1.DialogResult = System.Windows.Forms.DialogResult.OK;
			this.button1.Location = new System.Drawing.Point(312, 264);
			this.button1.Name = "button1";
			this.button1.TabIndex = 3;
			this.button1.Text = "OK";
			this.button1.Click += new System.EventHandler(this.button1_Click);
			// 
			// label1
			// 
			this.label1.FlatStyle = System.Windows.Forms.FlatStyle.System;
			this.label1.Location = new System.Drawing.Point(16, 264);
			this.label1.Name = "label1";
			this.label1.Size = new System.Drawing.Size(80, 24);
			this.label1.TabIndex = 4;
			this.label1.Text = "Version 1.0";
			// 
			// AboutForm
			// 
			this.AcceptButton = this.button1;
			this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
			this.BackColor = System.Drawing.SystemColors.Control;
			this.ClientSize = new System.Drawing.Size(400, 294);
			this.Controls.Add(this.label1);
			this.Controls.Add(this.button1);
			this.Controls.Add(this.textBox1);
			this.Controls.Add(this.linkLabel1);
			this.Name = "AboutForm";
			this.Text = "About Quoridor Classic Game Manager";
			this.Load += new System.EventHandler(this.AboutForm_Load);
			this.ResumeLayout(false);

		}
		#endregion

		private void linkLabel1_LinkClicked(object sender, System.Windows.Forms.LinkLabelLinkClickedEventArgs e)
		{
			try
			{
				System.Diagnostics.Process proc = new System.Diagnostics.Process();
				proc.EnableRaisingEvents=false;
				proc.StartInfo.FileName="mailto:kevind@uaa.alaska.edu";
				proc.Start();
			}
			catch(Exception)
			{
				MessageBox.Show("Could e-mail kevin. Try to do it manually! (Sorry)", "E-Mail Program Not Found", MessageBoxButtons.OK, MessageBoxIcon.Warning);
				return;
			}
		}

		private void AboutForm_Load(object sender, System.EventArgs e)
		{

		}

		private void button1_Click(object sender, System.EventArgs e)
		{
			this.Close();
		}

		/*private void axWebBrowser1_Enter(object sender, System.EventArgs e)
		{
			object nullObject = 0;
			string str = "";
			object nullStrObj = str;
			//this.axWebBrowser1.Navigate("about://blank", ref nullObject, ref nullStrObj, ref nullObject, ref nullObject);
		}*/
	}
}
