C
C#3y ago
Nikolaaa

Why is not this button working?

private void signinbtn_Click(object sender, EventArgs e)
{
if (String.IsNullOrEmpty(nameTxt.Text))
{
authTxt.Text = "Failed to authenticate." +
"Username can not be empty.";

}
else
{
if (String.IsNullOrEmpty(PassTxt.Text))
{
authTxt.Text = "Failed to authenticate." +
"Password can not be empty.";

}
else
{

authTxt.Text = "Success!";
//add code here!



}
}
private void signinbtn_Click(object sender, EventArgs e)
{
if (String.IsNullOrEmpty(nameTxt.Text))
{
authTxt.Text = "Failed to authenticate." +
"Username can not be empty.";

}
else
{
if (String.IsNullOrEmpty(PassTxt.Text))
{
authTxt.Text = "Failed to authenticate." +
"Password can not be empty.";

}
else
{

authTxt.Text = "Success!";
//add code here!



}
}
when I click Sign In nothing happens, why?
14 Replies
Buddy
Buddy3y ago
Just fix it /s Are you even subscribed to the click event?
Nikolaaa
NikolaaaOP3y ago
yes
Buddy
Buddy3y ago
Are you absolutely sure? Set a breakpoint.
Nikolaaa
NikolaaaOP3y ago
Nikolaaa
NikolaaaOP3y ago
you mean this? I am subscribed to it if this is what you mean
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Buddy
Buddy3y ago
Set a breakpoint, just to confirm that it is being called.
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Nikolaaa
NikolaaaOP3y ago
It changes color when I click it
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Buddy
Buddy3y ago
Can also be that you are not calling it from the UI-Thread
Nikolaaa
NikolaaaOP3y ago
oh wait, I am dumb I am so sorry, authTxt visibility was off
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Nikolaaa
NikolaaaOP3y ago
I was about to set it to on in code but forgot sorry I am going to close this post now
Want results from more Discord servers?
Add your server