The problem is as follows Quote
public bool Flag = false; private void Cell_MouseMove (object
sender, MouseEventArgs e) ( if (! Flag)
( Tic_Tac_Toe.Paint.Bar
(this.CreateGraphics (), (eX / 90) + 2 (EY / 90) + 2, 90, 90);
Flag = true; ) )
private void Cell_MouseLeave (object sender, EventArgs e) (
this.CreateGraphics (). Clear (Color.Blue); Flag =
false; ) I am painting a series of things in control. But since
I do not want flashes constantly while the mouse is moved on. I try to
create an escape using a bool. exactly where the problem starts? Quote
if (! Flag) (
Tic_Tac_Toe.Paint.Bar (this.CreateGraphics (), (eX / 90) + 2 (EY / 90) + 2, 90,
90); Flag = true; ) Well I always
imagine that the c # compiler debugging methods in a linear fashion. But it
seems that it is not so ... because when I say Quote
Tic_Tac_Toe.Paint.Bar (this.CreateGraphics (), (eX / 90) +
2 (EY / 90) + 2, 90, 90); Flag = true; I just paint the
first order of the method. automatically flag is true and the method for
running ... rather than what I expected or logically expect anyone guess.
The method was first implemented as written, then take the bool true ...
Someone can help me understand this problem? I would like to know that
this really happening behind this code ... The only idea I was going to keep
this as something positive that it's a way to ensure the rapid run-time ...
But even so I find it extremely disturbing that this happening ... The
method itself is this: Quote public static void Bar (e
Graphics, int x, int y, int Width, Height int) (
e.DrawRectangle (new Pen (new SolidBrush (Color.FromArgb (30, Color.DarkBlue)),
7), x, y, Width, Height); e.DrawRectangle (new Pen (new
SolidBrush (Color.FromArgb (40 Color.Blue)), 6), x, y, Width, Height);
e.DrawRectangle (new Pen (new SolidBrush (Color.FromArgb (50,
Color.SkyBlue)), 5), x, y, Width, Height); e.DrawRectangle (new
Pen (new SolidBrush (Color.FromArgb (60, Color.WhiteSmoke)), 4), x, y, Width,
Height); ) when the event occurs only executes the first order:
Quote e.DrawRectangle (new Pen (new SolidBrush
(Color.FromArgb (30, Color.DarkBlue)), 7), x, y, Width, Height); and
automatically call the original intercala method with the following order
Quote Flag = true; and the conditional to execute
the method is: Quote if (! Flag) run of automaticaly for
... |