Hello so i want a login system for my c# console application Here is the code that i used for my form application but i want it to work for my console application
I just want help with this like it would be nice if someone fixes it for me
as this is for my c# console application but this is for a form application
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 WhiteList
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void button1_Click_1(object sender, EventArgs e)
{
string whitelist = new System.Net.WebClient() { Proxy = null }.DownloadString("Your pastbin link");
string blacklist = new System.Net.WebClient() { Proxy = null }.DownloadString("Your pastbin link");
if (whitelist.Contains(textBox1.Text))
{
MessageBox.Show("Whitelisted!");
Form2 frm2 = new Form2();
frm2.Show();
this.Hide();
}
else
{
MessageBox.Show("Blacklisted! Closing...");
Application.Exit();
}
if (blacklist.Contains(textBox1.Text))
{
MessageBox.Show("Blacklisted! Closing...");
Application.Exit();
}
}
}
}
Tags: authentication, c#c#, login