I need to draw circles in a bitmap, but I want to do values instead.
For instance, instead of an array and storing terrain levels 0 to x number I figured it would be much faster to record a bitmap image the size of the map. Then drawing circles on top and every point that they overlay I would add that value +1.
Any pointers, code examples not required.
I'm not an expert yet, but I play one at work. Yeah and here too.
you are saying, trust me, I've set up MyArrayList to be a Synchronized version of another ArrayList, so this is threadsafe. Maybe the code that sets up the Synchronized version is nearby, so it's obvious (say in a using block).
Of course, if you forget to set up MyArrayList in that way, you've got a bug.
Program Manager, C#
This posting is provided "AS IS" with no warranties, and confers no rights.
It does not work, it has a bug. They way you coded, there will be times where no procedure will be called because you are calling r.NextDouble several times. What you need is to store the number on a local variable, like this:
r = new Random();
double d = r.NextDouble();
if (d < 0.6) -- A
if (d >=0.6 and < 0.9) -- B
if (d >=0.9 and < 1.0) -- C
I hope that you have money because it’s necessary to be practical.
And I hope that at least once a year you put some money in front of you and say "you are mine" just to make clear who owns who. - Victor Hugo
in my app., i have a window form with several labels and groupboxes but no button. i can receive keypress event of that form in my event handler.
however, after added a button the window form, i can't receive KeyPress Event. after deleted it or added another label, it work again!