Nikolaaa
Nikolaaa
CC#
Created by Nikolaaa on 9/9/2023 in #help
❔ problems with foreach loop
if (buttonTextBoxMap.TryGetValue(currentButton, out TextBox currentTextbox))
{


string currentText = new string(currentTextbox.Text.OrderBy(c => c).ToArray());

foreach (TextBox textBox in textBoxes)
{
if (textBox != currentTextbox) // Provjerite da li je trenutni TextBox isti kao currentTextbox
{
string textBoxText = new string(textBox.Text.OrderBy(c => c).ToArray());

if (textBoxText == currentText)
{
currentTextbox.Background = new SolidColorBrush(Color.FromArgb(76, 255, 0, 0));
}/*
else if (textBoxText != currentText)
{
currentTextbox.Background = new SolidColorBrush(Color.FromArgb(76, 0, 0, 0));
}*/ //<----------- THE PROBLEM IS THIS ELSE IF
}
}
}
if (buttonTextBoxMap.TryGetValue(currentButton, out TextBox currentTextbox))
{


string currentText = new string(currentTextbox.Text.OrderBy(c => c).ToArray());

foreach (TextBox textBox in textBoxes)
{
if (textBox != currentTextbox) // Provjerite da li je trenutni TextBox isti kao currentTextbox
{
string textBoxText = new string(textBox.Text.OrderBy(c => c).ToArray());

if (textBoxText == currentText)
{
currentTextbox.Background = new SolidColorBrush(Color.FromArgb(76, 255, 0, 0));
}/*
else if (textBoxText != currentText)
{
currentTextbox.Background = new SolidColorBrush(Color.FromArgb(76, 0, 0, 0));
}*/ //<----------- THE PROBLEM IS THIS ELSE IF
}
}
}
hello guys, I have a problem with getting the color of my textbox back because if I put it in a foreach loop some textbox in textBoxes list is not gonna have the same name and it activates the else if. I want it to only activate if none of the textboxes in the list have the same name as currentTextbox. I comented the line where the problem is. It will be red and instantly turn back to black (you can not see it but I debugged it, it does turn to red) because some textboxes have the same name and some don't, how do I make it only if all textboxes do not have the same name as currentTextbox
118 replies
CC#
Created by Nikolaaa on 9/9/2023 in #help
making a keybind system, need help
24 replies
CC#
Created by Nikolaaa on 3/12/2023 in #help
Properties.Settings.Default is not working (saying that it does not exist in the current namespace )
So basically what I wanted to do is grab variables from .settings file in my app, but it does not work because it says Settings does not exist. I am using dotnet core 7. Is that because it does not exist in dotnet core? Yea I know there is a workaround and I could do everything in a text file but I would prefer it this way.
7 replies
CC#
Created by Nikolaaa on 3/11/2023 in #help
Properties.Settings not working
I can not get this to work I need it for my settings file and im using net core so that might be a problem
4 replies
CC#
Created by Nikolaaa on 2/13/2023 in #help
❔ ctrl + z not working in visual studio winforms
As the title says, my undo shortcut is not working in visual studio. I checked and it is bound to Edit.Undo. It worked before.
2 replies
CC#
Created by Nikolaaa on 2/7/2023 in #help
❔ any way to add panel to winforms net core?
I am beginner and I was wondering if there was a way to add panel to net core project, cause it is nowhere to be found in toolbox.
43 replies
CC#
Created by Nikolaaa on 10/22/2022 in #help
why doesnt my console application let me make Main() class?
it says "Program does not contain a static "Main" method suitable for an entry point"
66 replies
CC#
Created by Nikolaaa on 10/21/2022 in #help
keyword this is not valid in a static property
what do i put here instead of this. ?
7 replies
CC#
Created by Nikolaaa on 10/17/2022 in #help
cant change text label inside events?
69 replies
CC#
Created by Nikolaaa on 10/16/2022 in #help
I need help with folder browse dialog [Answered]
3 replies
CC#
Created by Nikolaaa on 9/1/2022 in #help
Can not download file on dropbox
I am trying to make a self updater but I can not download files from dropbox
15 replies
CC#
Created by Nikolaaa on 9/1/2022 in #help
Why isnt webclient reading pastebin?
I made a post 2 days ago but the guy didnt help me so I am trying again. Why is not this working?
25 replies
CC#
Created by Nikolaaa on 8/29/2022 in #help
why does my windows forms app ignore pastebin text?
I made an auto update app and even if the version is the same it tries to update it. Why?
33 replies
CC#
Created by Nikolaaa on 8/26/2022 in #help
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?
17 replies