C# Form Projeleri 87 – Find Seasons Uygulaması v1.0

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 E_06_01_Find_Seasons_V1._0._0
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void BtnFind_Click(object sender, EventArgs e)
        {
            short N;

            N = Convert.ToInt16(TextValue.Text);

            switch (N)
            {
                case 12:
                case 1:
                case 2:
                    { TextMonth.Text = "Winter"; break; }

                case 3:
                case 4:
                case 5:
                    { TextMonth.Text = "Spring"; break; }

                case 6:
                case 7:
                case 8:
                    { TextMonth.Text = "Summer"; break; }

                case 9:
                case 10:
                case 11:
                    { TextMonth.Text = "Autumn"; break; }

                default:
                    MessageBox.Show("Can Not Enter a Value Outside The Range (1 - 12)");
                    break;
            }
        }
    }
}

 

Proje Dosyasını Github Hesabımdan İndirebilirsiniz


muratbilginer