using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace ch4_1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            label1.Text = "Enter a number : ";
            label2.Text = "Result is : ";
            button1.Text = "Start";
            button2.Text = "Exit";
        }

        private void button1_Click(object sender, EventArgs e)
        {
            label2 .Text = "Result is :";
            int num;
            num = Convert.ToInt32(textBox1.Text);
            if (num < 0)
                label2.Text += num.ToString() + " is negative .";
            else
                label2.Text += num.ToString() + " is positive .";
        }

        private void button2_Click(object sender, EventArgs e)
        {
            Form1.ActiveForm.Close();
        }
    }
}
