// Ideal Kilo Hesaplama | www.aliakyildirim.com | Ali AKYILDIRIM
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
// Ideal Kilo Hesaplama | www.aliakyildirim.com | Ali AKYILDIRIM
namespace WindowsFormsApplication1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        private void button1_Click(object sender, EventArgs e)
        {
            textBox1.Focus();
            // www.yazilimcik.com
        }
        private void button1_Click_1(object sender, EventArgs e)
        {
            try
            {
                int kilo;
                int boy;
                int sonuc = 0;
                try
                {
                    kilo = int.Parse(textBox1.Text);
                    boy = int.Parse(textBox2.Text);
                    if (radioButton1.Checked == true)
                    {
                        if (kilo > 40 && boy > 140)
                        {
                            sonuc = boy - (((150 - boy) / 4) + 100);
                            if (kilo > sonuc)
                            {
                                label3.Text = (sonuc - kilo).ToString() + " Kilo Fazlaniz Var..!";
                                MessageBox.Show("Ideal Kilonuzu Astiniz. Biraz Zayiflamak Iyidir..!", "www.aliakyildirim.com");
                                textBox1.Focus();
                            }
                            else if (kilo 
                            {
                                label3.Text = (sonuc - kilo).ToString() + " Kilo Eksiginiz Var..!";
                                MessageBox.Show("Ideal Kilonuzun Altindasiniz, Birseyler Yerseniz Iyi Olabilir.. ;)", "www.aliakyildirim.com");
                                textBox1.Focus();
                            }
                            else
                            {
                                MessageBox.Show("Tas Tamam, Böyle Kal.. Iyidir..!", "www.aliakyildirim.com");
                            }
                        }
                        else
                        {
                            MessageBox.Show("Kilo: 40, Boy: 140 ’tan Küçük Olamaz..! En Azindan Ben Böyle Bir Kural Koydum ;D", "www.aliakyildirim.com");
                        }
                    }
                    else if (radioButton2.Checked == true)
                    {
                        if (kilo > 40 && boy > 140)
                        {
                            sonuc = boy - (((150 - boy) / 4) + 110);
                            if (kilo > sonuc)
                            {
                                label3.Text = (sonuc - kilo).ToString() + " Kilo Fazlaniz Var..!";
                                MessageBox.Show("Ideal Kilonuzu Astiniz. Biraz Zayiflamak Iyidir..!", "www.aliakyildirim.com");
                                textBox1.Focus();
                            }
                            else if (kilo 
                            {
                                label3.Text = (sonuc - kilo).ToString() + " Kilo Eksiginiz Var..!";
                                MessageBox.Show("Ideal Kilonuzun Altindasiniz, Birseyler Yerseniz Iyi Olabilir.. ;)", "www.aliakyildirim.com");
                                textBox1.Focus();
                            }
                            else
                            {
                                MessageBox.Show("Tas Tamam, Böyle Kal.. Iyidir..!", "www.aliakyildirim.com");
                            }
                        }
                        else
                        {
                            MessageBox.Show("Kilo: 40, Boy: 140 ’tan Küçük Olamaz..! En Azindan Ben Böyle Bir Kural Koydum ;D", "www.aliakyildirim.com");
                        }
                    }
                    else
                    {
                        MessageBox.Show("Cinsiyet Lütfen..!", "www.aliakyildirim.com");
                        textBox1.Text = string.Empty;
                        textBox2.Text = string.Empty;
                        textBox1.Focus();
                    }
                }
                catch
                {
                    MessageBox.Show("Boy ve Kilo Degerlerini Girmediniz Amaaa..! ;)", "www.aliakyildirim.com");
                    textBox1.Text = string.Empty;
                    textBox2.Text = string.Empty;
                    textBox1.Focus();
                }
            }
            catch
            {
                MessageBox.Show("Bir Problem Var Ama, Du Bakalim..! ;)", "www.aliakyildirim.com");
                textBox1.Text = string.Empty;
                textBox2.Text = string.Empty;
                textBox1.Focus();
            }
        }
    }
}
// Ideal Kilo Hesaplama | www.aliakyildirim.com | Ali AKYILDIRIM