Share Pastebin
Guest
Public paste!

Brendan

By: a guest | Mar 22nd, 2010 | Syntax: C# | Size: 1.54 KB | Hits: 46 | Expires: Never
Copy text to clipboard
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Windows.Forms;
  9.  
  10. namespace Media
  11. {
  12.     public partial class Login : Form
  13.     {
  14.  
  15.         string[] uName = { "Brendan", "Georgia", "Maura", "Brett", "LAN" };
  16.         string[] pWd = { "password", "I Love Brendan", "HillMan100", "Open Up!", "Share" };
  17.  
  18.         public Login()
  19.         {
  20.             InitializeComponent();
  21.         }
  22.  
  23.         private void label1_Click(object sender, EventArgs e)
  24.         {
  25.  
  26.         }
  27.  
  28.         private void button1_Click(object sender, EventArgs e)
  29.         {
  30.             Close();
  31.         }
  32.  
  33.         private void button2_Click(object sender, EventArgs e)
  34.         {
  35.             if (textBox1.Text == uName[0] && maskedTextBox1.Text == pWd[0] || textBox1.Text == uName[1] && maskedTextBox1.Text == pWd[1]
  36.                 || textBox1.Text == uName[2] && maskedTextBox1.Text == pWd[2] || textBox1.Text == uName[3] && maskedTextBox1.Text == pWd[3]
  37.                 || textBox1.Text == uName[4] && maskedTextBox1.Text == pWd[4]);
  38.             {
  39.                 MessageBox.Show("Welcome");
  40.             }
  41.             else
  42.             {
  43.                 MessageBox.Show("Invalid");
  44.             }
  45.            
  46.         }
  47.  
  48.         private void textBox1_TextChanged(object sender, EventArgs e)
  49.         {
  50.  
  51.         }
  52.  
  53.         private void maskedTextBox1_MaskInputRejected(object sender, MaskInputRejectedEventArgs e)
  54.         {
  55.  
  56.         }
  57.     }
  58. }