Posts by Tane • 306 points
5 posts
-
3
votes2
answers170
viewsA: How can I create events in a safer way?
The easiest way is to remove an event notifier from an event and then add it again so it won’t get duplicated. No problem removing the notification without having added before. public static void…
-
2
votes1
answer683
views -
1
votes1
answer60
viewsA: Panel does not become invisible if Chart’s Paint event is activated
After changing the variable to true or false, you should paint Chart again. The code would look like this: pnlConfigurarDatas.Visible = false; if (checkPETR3.Checked) { drawPETR3Banco = true; } if…
-
9
votes3
answers12748
viewsA: Generate random numbers in an Array from 10 to 50
for (int i=0; i<array.length; i++) { array[i] = 10 + random.nextInt(40); // Gera números aleatórios com limite 50 e minimo 10. System.out.println(array[i]); // Saída, são gerados 5…
-
1
votes1
answer90
viewsA: Problems with Message Dialog in the Key Down event
I would just wait for the user to interact and then switch to Focus. private async void textRespPontuacaoMed_KeyDown(object sender, KeyEventArgs e) { if (e.Key == Key.Enter) { int min =…