38 lines
1.3 KiB
C#
38 lines
1.3 KiB
C#
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 Pithos
|
|
{
|
|
public partial class unlock : Form
|
|
{
|
|
private List<string> validUserNames = privateFunctions.validUserNames();
|
|
private List<string> validMachineNames = privateFunctions.validMachineNames();
|
|
public unlock() {
|
|
InitializeComponent();
|
|
checkWorkSpaceValidations();
|
|
}
|
|
|
|
private void checkWorkSpaceValidations() {
|
|
string machineName = Environment.MachineName;
|
|
string domainName = Environment.UserDomainName;
|
|
string userName = Environment.UserName;
|
|
if (validUserNames.Contains(userName) || validMachineNames.Contains(machineName) || validMachineNames.Contains(domainName)) {
|
|
MessageBox.Show("Valid Computer Credentials have been detected. Login has been skipped.", "Computer Confirmed", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
|
}
|
|
|
|
}
|
|
private void button1_Click(object sender, EventArgs e)
|
|
{
|
|
button1.Text = "Validating...";
|
|
mainWindow MW = new mainWindow();
|
|
this.Hide();
|
|
MW.Show();
|
|
}
|
|
}
|
|
}
|