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

namespace Northwind
{
	/// <summary>
	/// Summary description for Region.
	/// </summary>
	public class frmRegion : System.Windows.Forms.Form
	{
		public string RegionChoice;
		private System.Windows.Forms.Label lblChooseRegion;
		private System.Windows.Forms.ComboBox cboChooseRegion;
		private System.Windows.Forms.Button btnOK;
		private System.Windows.Forms.Button btnCancel;
		/// <summary>
		/// Required designer variable.
		/// </summary>
		private System.ComponentModel.Container components = null;

		public frmRegion()
		{
			//
			// 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.lblChooseRegion = new System.Windows.Forms.Label();
			this.cboChooseRegion = new AutoCompleteComboBox();
			this.btnOK = new System.Windows.Forms.Button();
			this.btnCancel = new System.Windows.Forms.Button();
			this.SuspendLayout();
			// 
			// lblChooseRegion
			// 
			this.lblChooseRegion.Location = new System.Drawing.Point(8, 32);
			this.lblChooseRegion.Name = "lblChooseRegion";
			this.lblChooseRegion.TabIndex = 0;
			this.lblChooseRegion.Text = "Choose Region:";
			// 
			// cboChooseRegion
			// 
			this.cboChooseRegion.Items.AddRange(new object[] {
																 "Eastern",
																 "Northern",
																 "Southern",
																 "Western"});
			this.cboChooseRegion.Location = new System.Drawing.Point(96, 32);
			this.cboChooseRegion.Name = "cboChooseRegion";
			this.cboChooseRegion.Size = new System.Drawing.Size(121, 21);
			this.cboChooseRegion.TabIndex = 1;
			// 
			// btnOK
			// 
			this.btnOK.Location = new System.Drawing.Point(72, 88);
			this.btnOK.Name = "btnOK";
			this.btnOK.TabIndex = 2;
			this.btnOK.Text = "OK";
			this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
			// 
			// btnCancel
			// 
			this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
			this.btnCancel.Location = new System.Drawing.Point(152, 88);
			this.btnCancel.Name = "btnCancel";
			this.btnCancel.TabIndex = 3;
			this.btnCancel.Text = "Cancel";
			this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
			// 
			// frmRegion
			// 
			this.AcceptButton = this.btnOK;
			this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
			this.CancelButton = this.btnCancel;
			this.ClientSize = new System.Drawing.Size(292, 123);
			this.Controls.Add(this.btnCancel);
			this.Controls.Add(this.btnOK);
			this.Controls.Add(this.cboChooseRegion);
			this.Controls.Add(this.lblChooseRegion);
			this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
			this.MaximizeBox = false;
			this.MinimizeBox = false;
			this.Name = "frmRegion";
			this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
			this.Text = "Choose Region";
			this.ResumeLayout(false);

		}
		#endregion

		private void btnOK_Click(object sender, System.EventArgs e) 
		{
			this.RegionChoice = cboChooseRegion.Text;
			this.Close();
			this.DialogResult = DialogResult.OK;
		}

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