using System; using System.Drawing; using System.Windows.Forms; class rem :Form { TextBox t1,t2,t3,t5; Button br,del; ListBox lb; static int index; Timer Clock; string [] t4; string [] remin; DateTime dt; Label l,l1; rem() { ClientSize = new Size(400,400); Text="Reminder"; t4=new string[20]; remin=new string[20]; Clock=new Timer(); Clock.Interval=1000; Clock.Start(); Clock.Tick+=new EventHandler(Timer_Tick); /*Reminder*/ l=new Label(); l.Location=new Point(10,0); l.Text="REMINDER"; l.ForeColor=Color.Cyan; Label l2= new Label(); l2.Location=new Point(40,80); l2.Text="DATE"; l2.ForeColor=Color.Blue; Label l3= new Label(); l3.Location=new Point(170,80); l3.Text="TIME"; l3.ForeColor=Color.Blue; Label l5= new Label(); l5.Location=new Point(300,80); l5.Text="Am/PM"; l5.ForeColor=Color.Blue; l1= new Label(); l1.Location=new Point(20,20); l1.Size=new Size(200,50); l1.ForeColor=Color.Red; dt=DateTime.Now; l1.Text=dt.ToString(); t2=new TextBox(); t2.Location=new Point(10,120); t2.Text="00/00/0000"; t3=new TextBox(); t3.Location=new Point(130,120); t3.Text="00:00:00"; t5=new TextBox(); t5.Location=new Point(250,120); t5.Text="AM"; t1=new TextBox(); t1.Location=new Point(5,150); t1.Size=new Size(250,100); t1.Text=" "; br=new Button(); br.Location=new Point(280,150); br.Text="Set Reminder"; br.Size=new Size(90,20); br.Click += new EventHandler(br_Click); del=new Button(); del.Location=new Point(280,170); del.Text="Delete Reminder"; del.Size=new Size(100,20); del.Click += new EventHandler(del_Click); lb=new ListBox(); lb.Location=new Point (5,200); lb.Size=new Size(320,180); lb.BackColor=Color.Red; Controls.AddRange(new Control[]{ t1,lb,br,l,l1 ,t2,t3,l2,l3,t5,del,l5} ); MessageBox.Show("Welcome to the Remainder Application"); } public void Timer_Tick(object sender,EventArgs eArgs) { if(sender==Clock) { dt=DateTime.Now; l1.Text=dt.ToString(); } for(int j=0;j"); t1.AppendText(t2.Text); t1.AppendText(" "); t1.AppendText(t3.Text); t1.AppendText(" "); t1.AppendText(t5.Text); lb.Items.Add(t1.Text); remin[index]=t1.Text; t1.Text=" "; t4[index]=string.Concat(t2.Text," "); t4[index]=string.Concat(t4[index],t3.Text); t4[index]=string.Concat(t4[index]," "); t4[index]=string.Concat(t4[index],t5.Text); index++; t3.Text="00:00:00"; t2.Text="00/00/0000"; t5.Text="AM"; } } public static void Main() { Application.Run(new rem()); } }