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

namespace miniMMLSampleViewer
{
	/// <summary>
	/// </summary>
	public class VersionForm : System.Windows.Forms.Form
	{
		private System.Windows.Forms.PictureBox pictureBox1;
		private System.Windows.Forms.TextBox textBoxVersion;
		private System.Windows.Forms.TextBox textBox2;
		private System.Windows.Forms.Button btnOK;
		/// <summary>
		/// </summary>
		private System.ComponentModel.Container components = null;

		public VersionForm()
		{
			//
			//
			InitializeComponent();

			//
			//
		}

		/// <summary>
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if(components != null)
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}

		#region Windows
		/// <summary>
		/// </summary>
		private void InitializeComponent()
		{
			this.textBoxVersion = new System.Windows.Forms.TextBox();
			this.textBox2 = new System.Windows.Forms.TextBox();
			this.btnOK = new System.Windows.Forms.Button();
			this.pictureBox1 = new System.Windows.Forms.PictureBox();
			((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
			this.SuspendLayout();
			// 
			// textBoxVersion
			// 
			this.textBoxVersion.BorderStyle = System.Windows.Forms.BorderStyle.None;
			this.textBoxVersion.Location = new System.Drawing.Point(72, 16);
			this.textBoxVersion.Name = "textBoxVersion";
			this.textBoxVersion.ReadOnly = true;
			this.textBoxVersion.Size = new System.Drawing.Size(216, 12);
			this.textBoxVersion.TabIndex = 1;
			this.textBoxVersion.Text = "miniMML Sample Viewer Version 1.0";
			// 
			// textBox2
			// 
			this.textBox2.BorderStyle = System.Windows.Forms.BorderStyle.None;
			this.textBox2.Location = new System.Drawing.Point(72, 42);
			this.textBox2.Name = "textBox2";
			this.textBox2.ReadOnly = true;
			this.textBox2.Size = new System.Drawing.Size(259, 12);
			this.textBox2.TabIndex = 2;
			this.textBox2.Text = "Copyright(C) 2011-2012 Moritex Co., LTD";
			// 
			// btnOK
			// 
			this.btnOK.DialogResult = System.Windows.Forms.DialogResult.OK;
			this.btnOK.Location = new System.Drawing.Point(336, 16);
			this.btnOK.Name = "btnOK";
			this.btnOK.Size = new System.Drawing.Size(88, 24);
			this.btnOK.TabIndex = 0;
			this.btnOK.Text = "OK";
			// 
			// pictureBox1
			// 
			this.pictureBox1.Image = global::miniMMLSampleViewer.Properties.Resources.App;
			this.pictureBox1.Location = new System.Drawing.Point(12, 12);
			this.pictureBox1.Name = "pictureBox1";
			this.pictureBox1.Size = new System.Drawing.Size(48, 48);
			this.pictureBox1.TabIndex = 0;
			this.pictureBox1.TabStop = false;
			// 
			// VersionForm
			// 
			this.AutoScaleBaseSize = new System.Drawing.Size(5, 12);
			this.ClientSize = new System.Drawing.Size(442, 72);
			this.Controls.Add(this.btnOK);
			this.Controls.Add(this.textBox2);
			this.Controls.Add(this.textBoxVersion);
			this.Controls.Add(this.pictureBox1);
			this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
			this.MaximizeBox = false;
			this.Name = "VersionForm";
			this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
			this.Text = "Version";
			this.Load += new System.EventHandler(this.VersionForm_Load);
			((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
			this.ResumeLayout(false);
			this.PerformLayout();

		}
		#endregion

		private void VersionForm_Load(object sender, EventArgs e)
		{
			String[] szVersion = Application.ProductVersion.Split(new char[] { '.' });
			if (szVersion.GetLength(0) != 4)
			{
			}
			else
			{
				int nSmall = int.Parse(szVersion[1]);
				textBoxVersion.Text = "miniMML Sample Viewer Version " + szVersion[0] + "." + nSmall.ToString("00");
			}
		}
	}
}
