ERROR: System.FormatException: De indeling van de
invoertekenreeks is onjuist.
bij System.Number.StringToNumber(String str, NumberStyles options, NumberBuff
er& number, NumberFormatInfo info, Boolean parseDecimal)
bij System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo i
bij System.Convert.ToInt32(String value)
bij SteamBot.SimpleUserHandler.PriceUpdate() in c:\Users\Gebruiker\Documents\
bij SteamBot.SimpleUserHandler.OnLoginCompleted() in c:\Users\Gebruiker\Docum
bij SteamBot.Bot.<handlesteammessage>b__5(LoginKeyCallback callback) in c:\Us
bij SteamKit2.CallbackMsgExtensions.Handle[T](ICallbackMsg msg, Action`1 hand
bij SteamBot.Bot.HandleSteamMessage(ICallbackMsg msg) in c:\Users\Gebruiker\D
bij SteamBot.Bot.BackgroundWorkerOnDoWork(Object sender, DoWorkEventArgs doWo
rkEventArgs) in c:\Users\Gebruiker\Documents\Bot\KeyBot\SteamBot\Bot.cs:regel 89
Start by using the debugger and looking at the data you have downloaded from the file: what exactly does it contain?
Then look at the array content post-split: what is in the second array element, exactly?
The chances are that the data is not what you expect, and the "second line" does not contain just a number.
But we can't check that for you!
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
There's a heck of a lot of code going on here, and it certainly appears as though you're violating SRP here. Rather than doing things like this, I would look to implement separate classes that do what you need to do - each class would then decide whether it was the one that handled the case. There's even a name for this, as a pattern; it's called the Chain Of Responsibility. So, you would end up with something like this:
Off topic with regards to your question but is your key testing code correct?
I assume the intention of the following code is to allow A or Alt-A
if ((e.KeyCode == Keys.A || (e.Alt && e.KeyCode == Keys.A))
The first condition does not test for modifier keys so would be true for A with any combination of modifiers keys (including none). Due to shortcut evaluation the second condition will be evaluated only if the first is false, that is if the Key is NOT A and I'm sure you can see the problem with that. Even if it was evaluated the condition does not exclude additional modifiers so Ctrl-Alt-A would be allowed.
The solution is to test the key and the modifiers separately. Specifically the modifiers test should be for none or just Alt.
I really hate using anonymous types because they just make your code harder to debug and understand. I strongly suggest replacing the anonymous type with an actual class. I see no reason why you need to use a anonymous type here.
Anonymous types are good for use inside the method where it's defined, not really for passing around to other methods.
The reason being is that you have to define your anonymous type all over again just so you can cast the value back to that type. That's doubling your work and introducing another opportunity to introduce bugs into your code. This is especially true in this case because if you change the type definition, you have to do it in multiple places. YUK!
hi i want to have text(textbox8) show on form 1 (frmLogin)
shown on form2(files) textbox (textbox1)
my code: textbox1.Text = textbox8.text ,,, error,,,,name(textbox8) login form does not exist in current context
You can lead a developer to CodeProject, but you can't make them think.
The Theory of Gravity was invented for the sole purpose of distracting you from investigating the scientific fact that the Earth sucks.
Yes, you should check the result of the MessageBox.Show message, and perhaps put a better message, and extra button, so the user can continue or cancel. Alternatively, if this error is unrecoverable, you should just exit aftger the message is dismissed by the user.