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

namespace LineNumber
{
	/// <summary>
	/// Summary description for MainApp.
	/// </summary>
	public class MainApp : System.Windows.Forms.Form
	{
		private System.Windows.Forms.TextBox txtContent;
		private System.Windows.Forms.MainMenu mainMenu1;
		private System.Windows.Forms.MenuItem menuItem1;
		/// <summary>
		/// Required designer variable.
		/// </summary>
		private System.ComponentModel.Container components = null;

		public MainApp()
		{
			//
			// 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.txtContent = new System.Windows.Forms.TextBox();
			this.mainMenu1 = new System.Windows.Forms.MainMenu();
			this.menuItem1 = new System.Windows.Forms.MenuItem();
			this.SuspendLayout();
			// 
			// txtContent
			// 
			this.txtContent.Dock = System.Windows.Forms.DockStyle.Fill;
			this.txtContent.Multiline = true;
			this.txtContent.Name = "txtContent";
			this.txtContent.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
			this.txtContent.Size = new System.Drawing.Size(292, 273);
			this.txtContent.TabIndex = 0;
			this.txtContent.Text = "";
			// 
			// mainMenu1
			// 
			this.mainMenu1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
																					  this.menuItem1});
			// 
			// menuItem1
			// 
			this.menuItem1.Index = 0;
			this.menuItem1.Text = "ΌΣΠΠΊΕ(&A)";
			this.menuItem1.Click += new System.EventHandler(this.menuItem1_Click);
			// 
			// MainApp
			// 
			this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
			this.ClientSize = new System.Drawing.Size(292, 273);
			this.Controls.AddRange(new System.Windows.Forms.Control[] {
																		  this.txtContent});
			this.Menu = this.mainMenu1;
			this.Name = "MainApp";
			this.Text = "ΌΣΠΠΊΕ";
			this.ResumeLayout(false);

		}
		#endregion

		/// <summary>
		/// The main entry point for the application.
		/// </summary>
		[STAThread]
		static void Main() 
		{
			Application.Run(new MainApp());
		}

		

		private void menuItem1_Click(object sender, System.EventArgs e)
		{
			int n=1;string data="";
			foreach (string s in txtContent.Lines)
			{
				data+=n.ToString() + "  " + s + "\r\n";
				n++;
			}
			txtContent.Text=data;
		}
	}
}
