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

namespace PunkMan.Editor
{
	/// <summary>
	/// Summary description for NewForm.
	/// </summary>
	public class NewForm : System.Windows.Forms.Form
	{
		private System.Windows.Forms.GroupBox groupBox1;
		private System.Windows.Forms.Label label1;
		private System.Windows.Forms.Label label2;
		private System.Windows.Forms.Button button1;
		private System.Windows.Forms.Button button2;
		private System.Windows.Forms.NumericUpDown nupWidth;
		private System.Windows.Forms.NumericUpDown nupHeight;
		/// <summary>
		/// Required designer variable.
		/// </summary>
		private System.ComponentModel.Container components = null;

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

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

		/// <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.groupBox1 = new System.Windows.Forms.GroupBox();
			this.nupWidth = new System.Windows.Forms.NumericUpDown();
			this.label1 = new System.Windows.Forms.Label();
			this.label2 = new System.Windows.Forms.Label();
			this.nupHeight = new System.Windows.Forms.NumericUpDown();
			this.button1 = new System.Windows.Forms.Button();
			this.button2 = new System.Windows.Forms.Button();
			this.groupBox1.SuspendLayout();
			((System.ComponentModel.ISupportInitialize)(this.nupWidth)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.nupHeight)).BeginInit();
			this.SuspendLayout();
			// 
			// groupBox1
			// 
			this.groupBox1.Controls.Add(this.nupHeight);
			this.groupBox1.Controls.Add(this.label2);
			this.groupBox1.Controls.Add(this.label1);
			this.groupBox1.Controls.Add(this.nupWidth);
			this.groupBox1.Location = new System.Drawing.Point(8, 8);
			this.groupBox1.Name = "groupBox1";
			this.groupBox1.Size = new System.Drawing.Size(152, 88);
			this.groupBox1.TabIndex = 0;
			this.groupBox1.TabStop = false;
			this.groupBox1.Text = "Map size";
			// 
			// nupWidth
			// 
			this.nupWidth.Location = new System.Drawing.Point(80, 24);
			this.nupWidth.Maximum = new System.Decimal(new int[] {
																	 64,
																	 0,
																	 0,
																	 0});
			this.nupWidth.Minimum = new System.Decimal(new int[] {
																	 4,
																	 0,
																	 0,
																	 0});
			this.nupWidth.Name = "nupWidth";
			this.nupWidth.Size = new System.Drawing.Size(56, 20);
			this.nupWidth.TabIndex = 0;
			this.nupWidth.Value = new System.Decimal(new int[] {
																   10,
																   0,
																   0,
																   0});
			// 
			// label1
			// 
			this.label1.Location = new System.Drawing.Point(16, 24);
			this.label1.Name = "label1";
			this.label1.Size = new System.Drawing.Size(48, 16);
			this.label1.TabIndex = 1;
			this.label1.Text = "Width:";
			// 
			// label2
			// 
			this.label2.Location = new System.Drawing.Point(16, 56);
			this.label2.Name = "label2";
			this.label2.Size = new System.Drawing.Size(40, 16);
			this.label2.TabIndex = 2;
			this.label2.Text = "Height:";
			// 
			// nupHeight
			// 
			this.nupHeight.Location = new System.Drawing.Point(80, 56);
			this.nupHeight.Maximum = new System.Decimal(new int[] {
																	  64,
																	  0,
																	  0,
																	  0});
			this.nupHeight.Minimum = new System.Decimal(new int[] {
																	  4,
																	  0,
																	  0,
																	  0});
			this.nupHeight.Name = "nupHeight";
			this.nupHeight.Size = new System.Drawing.Size(56, 20);
			this.nupHeight.TabIndex = 3;
			this.nupHeight.Value = new System.Decimal(new int[] {
																	10,
																	0,
																	0,
																	0});
			// 
			// button1
			// 
			this.button1.Location = new System.Drawing.Point(176, 16);
			this.button1.Name = "button1";
			this.button1.Size = new System.Drawing.Size(75, 24);
			this.button1.TabIndex = 1;
			this.button1.Text = "&Ok";
			this.button1.Click += new System.EventHandler(this.button1_Click);
			// 
			// button2
			// 
			this.button2.Location = new System.Drawing.Point(176, 64);
			this.button2.Name = "button2";
			this.button2.Size = new System.Drawing.Size(75, 24);
			this.button2.TabIndex = 2;
			this.button2.Text = "&Cancel";
			this.button2.Click += new System.EventHandler(this.button2_Click);
			// 
			// NewForm
			// 
			this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
			this.ClientSize = new System.Drawing.Size(264, 109);
			this.Controls.Add(this.button2);
			this.Controls.Add(this.button1);
			this.Controls.Add(this.groupBox1);
			this.MaximizeBox = false;
			this.MaximumSize = new System.Drawing.Size(272, 136);
			this.MinimizeBox = false;
			this.MinimumSize = new System.Drawing.Size(272, 136);
			this.Name = "NewForm";
			this.ShowInTaskbar = false;
			this.Text = "New Map";
			this.groupBox1.ResumeLayout(false);
			((System.ComponentModel.ISupportInitialize)(this.nupWidth)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.nupHeight)).EndInit();
			this.ResumeLayout(false);

		}
		#endregion


		/// <summary>
		/// New map width
		/// </summary>
		public int MapWidth { get { return (int)nupWidth.Value; } }
		/// <summary>
		/// New map height
		/// </summary>
		public int MapHeight { get { return (int)nupHeight.Value; } }


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

		private void button2_Click(object sender, System.EventArgs e)
		{
			this.DialogResult = DialogResult.Cancel;
			Close();
		}
	}
}
