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 login { public partial class Form1 : Form { public Form1() { InitializeComponent(); }
private void button1_Click(object sender, EventArgs e) { if (textBox1.Text == "" && textBox2.Text == "") { MessageBox.Show("kullanıcı adı ve şifreyi boş bırakmalan"); } else if (textBox1.Text == "") { MessageBox.Show("kullanıcı adı boş geçilemez"); } else if (textBox2.Text == "") { MessageBox.Show("şifre boş geçilemez"); } else if (textBox1.Text != "bilişim") { MessageBox.Show("hatalı kullanıcı adı"); } else if (textBox2.Text != "1234") { MessageBox.Show("hatalı şifre"); } else { MessageBox.Show("giriş başarılı"); }
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 login
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
if (textBox1.Text == "" && textBox2.Text == "")
{
MessageBox.Show("kullanıcı adı ve şifreyi boş bırakmalan");
}
else if (textBox1.Text == "")
{
MessageBox.Show("kullanıcı adı boş geçilemez");
}
else if (textBox2.Text == "")
{
MessageBox.Show("şifre boş geçilemez");
}
else if (textBox1.Text != "bilişim")
{
MessageBox.Show("hatalı kullanıcı adı");
}
else if (textBox2.Text != "1234")
{
MessageBox.Show("hatalı şifre");
}
else
{
MessageBox.Show("giriş başarılı");
}
}
private void checkBox1_CheckedChanged(object sender, EventArgs e)
{
if (checkBox1.Checked==true)
{
textBox2.PasswordChar = '\0';
}
else
{
textBox2.PasswordChar = '*';
}
}
}
}