Still not recommended. Got extremely bored.
PHP Code:
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 AP
{
public partial class frmMain : Form
{
int IntNum = 0;
int IntWait = 60;
public frmMain()
{
InitializeComponent();
}
private void cmdCheck_Click(object sender, EventArgs e)
{
if (txtPassword.Text == "Password")
{
MessageBox.Show("Welcome!", "Success");
}
else if (IntNum >= 5)
{
MessageBox.Show ("You have been blocked for to many failed login attempts!","Blocked");
tmrBlock.Enabled = true;
IntNum = 0;
cmdCheck.Enabled = false;
txtPassword.Enabled = false;
}
else
{
MessageBox.Show("Password incorrect!", "Error");
IntNum = IntNum + 1;
}
}
private void tmrBlock_Tick(object sender, EventArgs e)
{
IntWait = IntWait - 1;
if (IntWait <= 0)
{
cmdCheck.Enabled = true;
txtPassword.Enabled = true;
tmrBlock.Enabled = false;
MessageBox.Show ("Please try again!","Unblocked");
}
}
}
}
Results 1 to 2 of 2
- 02 Jan. 2010 05:39am #1
[C#] Advanced Password Protection
- 02 Jan. 2010 10:22am #2A+ I needed this for my flp admin panel i will give you credits thanks ^^