gamer50082
gamer50082
Explore posts from servers
CC#
Created by gamer50082 on 5/5/2023 in #help
❔ the feature your trying to use is on a network resource that is unavailable
4 replies
CC#
Created by gamer50082 on 4/23/2023 in #help
✅ how to get this dependencies
Form1.Designer.cs(72,30,72,41): error CS0246: The type or namespace name 'MongoClient' could not be found (are you missing a using directive or an assembly reference?) Form1.Designer.cs(74,53,74,65): error CS0246: The type or namespace name 'BsonDocument' could not be found (are you missing a using directive or an assembly reference?) Form1.Designer.cs(77,35,77,47): error CS0246: The type or namespace name 'BsonDocument' could not be found (are you missing a using directive or an assembly reference?) Form1.Designer.cs(77,26,77,48): error CS0103: The name 'Builders' does not exist in the current context how to get those dependency
16 replies
CC#
Created by gamer50082 on 4/23/2023 in #help
✅ login registration form not working
3 forms mainform.cs shows 2 buttons register login register.cs contain 3 textbox [username] [password] [confirmpassword] 1 button to send [username] and [password] to /api/register. if credentials is correct it should receive (token) and (accountType {Basic, Premium}) login.cs contain 2 textbox [username] [password] to /api/login. if credentials is correct it should receive (token) and (accountType {Basic, Premium})
6 replies
CC#
Created by gamer50082 on 4/23/2023 in #help
✅ my ui and backend not working together
private const string ServerUrl = "http://144.24.154.156:5445/api/login"; // replace with your Node.js server URL

public Form3()
{
InitializeComponent();
}

private async void button1_Click(object sender, EventArgs e)
{
var username = textBox1.Text;
var password = textBox2.Text;

var client = new HttpClient();

var requestData = new Dictionary<string, string>
{
{"username", username},
{"password", password}
};
var requestContent = new FormUrlEncodedContent(requestData);

var response = await client.PostAsync(ServerUrl, requestContent);

var responseContent = await response.Content.ReadAsStringAsync();

if (!response.IsSuccessStatusCode)
{
MessageBox.Show("Login failed. Please check your username and password.");
return;
}

var responseData = JsonConvert.DeserializeObject<Dictionary<string, string>>(responseContent);

var token = responseData["token"];
var accountType = responseData["accountType"];

if (accountType == "basic")
{
var form1 = new Form1(token);
form1.Show();
}
else if (accountType == "premium")
{
var form2 = new Form2(token);
form2.Show();
}

this.Hide();
}

private void button2_Click(object sender, EventArgs e)
{
var registerForm = new RegisterForm();
registerForm.Show();
this.Hide();
}
private const string ServerUrl = "http://144.24.154.156:5445/api/login"; // replace with your Node.js server URL

public Form3()
{
InitializeComponent();
}

private async void button1_Click(object sender, EventArgs e)
{
var username = textBox1.Text;
var password = textBox2.Text;

var client = new HttpClient();

var requestData = new Dictionary<string, string>
{
{"username", username},
{"password", password}
};
var requestContent = new FormUrlEncodedContent(requestData);

var response = await client.PostAsync(ServerUrl, requestContent);

var responseContent = await response.Content.ReadAsStringAsync();

if (!response.IsSuccessStatusCode)
{
MessageBox.Show("Login failed. Please check your username and password.");
return;
}

var responseData = JsonConvert.DeserializeObject<Dictionary<string, string>>(responseContent);

var token = responseData["token"];
var accountType = responseData["accountType"];

if (accountType == "basic")
{
var form1 = new Form1(token);
form1.Show();
}
else if (accountType == "premium")
{
var form2 = new Form2(token);
form2.Show();
}

this.Hide();
}

private void button2_Click(object sender, EventArgs e)
{
var registerForm = new RegisterForm();
registerForm.Show();
this.Hide();
}
35 replies
CC#
Created by gamer50082 on 4/22/2023 in #help
✅ need someone to fix a html for me
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Login</title>
</head>
<body>
<h1>Login</h1>
<form action="http://144.24.154.156:5445/login" method="POST">
<label for="username">Username:</label>
<input type="text" id="username" name="username" required><br><br>
<label for="password">Password:</label>
<input type="password" id="password" name="password" required><br><br>
<button type="submit">Login</button>
</form>

<h1>Register</h1>
<form action="http://144.24.154.156:5445/register" method="POST">
<label for="username">Username:</label>
<input type="text" id="username" name="username" required><br><br>
<label for="password">Password:</label>
<input type="password" id="password" name="password" required><br><br>
<label for="confirm-password">Confirm Password:</label>
<input type="password" id="confirm-password" name="confirm-password" required><br><br>
<button type="submit">Register</button>
</form>

<script>
// Parse the query string to get the token parameter
const queryString = window.location.search;
const urlParams = new URLSearchParams(queryString);
const token = urlParams.get('token');

// If a token was received, display it
if (token) {
const tokenElement = document.createElement('p');
tokenElement.textContent = `Your token is: ${token}`;
document.body.appendChild(tokenElement);
}
</script>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Login</title>
</head>
<body>
<h1>Login</h1>
<form action="http://144.24.154.156:5445/login" method="POST">
<label for="username">Username:</label>
<input type="text" id="username" name="username" required><br><br>
<label for="password">Password:</label>
<input type="password" id="password" name="password" required><br><br>
<button type="submit">Login</button>
</form>

<h1>Register</h1>
<form action="http://144.24.154.156:5445/register" method="POST">
<label for="username">Username:</label>
<input type="text" id="username" name="username" required><br><br>
<label for="password">Password:</label>
<input type="password" id="password" name="password" required><br><br>
<label for="confirm-password">Confirm Password:</label>
<input type="password" id="confirm-password" name="confirm-password" required><br><br>
<button type="submit">Register</button>
</form>

<script>
// Parse the query string to get the token parameter
const queryString = window.location.search;
const urlParams = new URLSearchParams(queryString);
const token = urlParams.get('token');

// If a token was received, display it
if (token) {
const tokenElement = document.createElement('p');
tokenElement.textContent = `Your token is: ${token}`;
document.body.appendChild(tokenElement);
}
</script>
</body>
</html>
27 replies
CC#
Created by gamer50082 on 4/22/2023 in #help
✅ winform not working
not working at all only can open
27 replies
CC#
Created by gamer50082 on 4/21/2023 in #help
✅ making a winform that downloads files from github
need help making the system
54 replies
CC#
Created by gamer50082 on 4/20/2023 in #help
✅ Make an exe
an exe that isnt a token graber stop saying it is
95 replies