🙂 İNSANLARIN EN HAYIRLISI INSANLARA FAYDALI OLANDIR 🙂

Burak HABER / C# / Renklerin Dili (Ders13)

1-) C# - Renklerin Dili (Ders13)

Form2.cs
    private void button1_Click(object sender, EventArgs e)

        {

            if (comboBox1.Text == "mavi")

            {

                label4.Text = textBox1.Text + " " + comboBox1.Text + " rengi= " + " Mutluluğun rengidir =) ";

                button2.BackColor = Color.Blue;

            }

            if (comboBox1.Text == "sarı")

            {

                label4.Text = textBox1.Text + " " + comboBox1.Text + " rengi= " + " İyimserliğin rengidir =) ";

                button2.BackColor = Color.Yellow;

            }

            if (comboBox1.Text == "kırmızı")

            {

                label4.Text = textBox1.Text + " " + comboBox1.Text + " rengi= " + " Mutluluğun rengidir =) ";

                button2.BackColor = Color.Red;

            }

            if (comboBox1.Text == "beyaz")

            {

                label4.Text = textBox1.Text + " " + comboBox1.Text + " rengi= " + " Mutluluğun rengidir =) ";

                button2.BackColor = Color.White;

            }

            if (comboBox1.Text == "siyah")

            {

                label4.Text = textBox1.Text + " " + comboBox1.Text + " rengi= " + " Mutluluğun rengidir =) ";

                button2.BackColor = Color.Black;

            }

            if (comboBox1.Text == "yeşil")

            {

                label4.Text = textBox1.Text + " " + comboBox1.Text + " rengi= " + " Mutluluğun rengidir =) ";

                button2.BackColor = Color.Green;

            }


Form1.cs

      
private void button1_Click(object sender, EventArgs e)

        {

            if (textBox1.Text == "yönetici"&& textBox2.Text == "12345")

            {

                Form2 renkformu = new Form2();

                renkformu.Show();

                this.Hide();

            }

            else

            {

                MessageBox.Show("Yanlış giriş yaptınız Yeniden deneyin");

                textBox1.Clear();

                textBox2.Clear();

            }

        }

 

        private void button2_Click(object sender, EventArgs e)

        {

            Form2 renk = new Form2();

            renk.Show();

            this.Hide();

 2021 Mart 11 Perşembe
 358