archive
/
pithos
Archived
1
Fork 0

Removed testing code, added branding, and started work on char decorator,

This commit is contained in:
Jake Howard 2015-01-04 22:30:56 +00:00
parent 6650683d55
commit 2e1e51507d
1 changed files with 21 additions and 8 deletions

View File

@ -9,18 +9,20 @@ using System.Threading.Tasks;
using System.Windows.Forms;
namespace Pithos
{
public partial class unlock : Form
{
public partial class unlock : Form {
private List<string> validUserNames = privateFunctions.validUserNames();
private List<string> validMachineNames = privateFunctions.validMachineNames();
private List<char> licenseChar = new List<char>();
public unlock() {
InitializeComponent();
}
private void loginSuccessful()
{
private void loginSuccessful() {
this.Hide();
Program.MW.Show();
licenceInput.Text = "";
unlockButton.Text = "Unlock";
}
private void checkWorkSpaceValidations() {
@ -30,19 +32,30 @@ namespace Pithos
if (validUserNames.Contains(userName) || validMachineNames.Contains(machineName) || validMachineNames.Contains(domainName)) {
MessageBox.Show("Valid Computer Credentials have been detected. Automatic Login Initiated.", "Computer Confirmed", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
loginSuccessful();
}
private void button1_Click(object sender, EventArgs e)
{
private void button1_Click(object sender, EventArgs e) {//validation
unlockButton.Text = "Validating...";
//checkWorkSpaceValidations();
if (privateFunctions.checkHardCodes(licenceInput.Text)) {
MessageBox.Show("You have entered hard-coded login credentials. Access Granted.", "Access Granted", MessageBoxButtons.OK, MessageBoxIcon.Information);
loginSuccessful();
}
else
{
MessageBox.Show("Incorrent Login. Access Denied", "Access Denied", MessageBoxButtons.OK, MessageBoxIcon.Stop);
unlockButton.Text = "Unlock";
}
}
private void unlock_Load(object sender, EventArgs e) {
//checkWorkSpaceValidations();
private void infoLabel_Click(object sender, EventArgs e) { System.Diagnostics.Process.Start("http://theorangeone.net/pithos"); }
private void licenceInput_TextChanged(object sender, EventArgs e)
{
System.Random rnd = new System.Random();
rnd.Next(licenseChar.Count);
}
}
}