private void pictureBox1_MouseMov object sender MouseEventArgs if pnt

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
private void pictureBox1_MouseMove(object sender, MouseEventArgs e)
{
if (pnt == nullPt)
{
return;
}
switch (mode)
{
case 0:
if (e.Button == MouseButtons.Left)
{
Graphics g = Graphics.FromImage(pictureBox1.Image);
g.DrawLine(pen, pnt, e.Location);
g.Dispose();
pnt = e.Location;
pictureBox1.Invalidate();
}
break;
case 1:
case 2:
{
if (e.Button == MouseButtons.Left)
{
ReversibleDraw();
movePt = e.Location;
ReversibleDraw();
} break;
}
}
}