Brendan
By: a guest | Mar 22nd, 2010 | Syntax:
C# | Size: 1.54 KB | Hits: 46 | Expires: Never
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;
namespace Media
{
public partial class Login : Form
{
string[] uName = { "Brendan", "Georgia", "Maura", "Brett", "LAN" };
string[] pWd = { "password", "I Love Brendan", "HillMan100", "Open Up!", "Share" };
public Login()
{
InitializeComponent();
}
private void label1_Click(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
Close();
}
private void button2_Click(object sender, EventArgs e)
{
if (textBox1.Text == uName[0] && maskedTextBox1.Text == pWd[0] || textBox1.Text == uName[1] && maskedTextBox1.Text == pWd[1]
|| textBox1.Text == uName[2] && maskedTextBox1.Text == pWd[2] || textBox1.Text == uName[3] && maskedTextBox1.Text == pWd[3]
|| textBox1.Text == uName[4] && maskedTextBox1.Text == pWd[4]);
{
MessageBox.Show("Welcome");
}
else
{
MessageBox.Show("Invalid");
}
}
private void textBox1_TextChanged(object sender, EventArgs e)
{
}
private void maskedTextBox1_MaskInputRejected(object sender, MaskInputRejectedEventArgs e)
{
}
}
}