private class ArrayPoints
{
private int index = 0;
private Point[] points;
public ArrayPoints(int size)
{
if(size <= 0) { size = 2; }
points = new Point[size];
}
public void SetPoint(int x, int y)
{
if(index >= points.Length)
{
index = 0;
}
points[index] = new Point(x, y);
index++;
}
public void ResetPoints()
{
index = 0;
}
public int GetCountPoints()
{
return index;
}
public Point[] GetPoints()
{
return points;
}
}
private bool isMouse = false;
private ArrayPoints arrayPoints = new ArrayPoints(2);
Bitmap map = new Bitmap(100, 100);
Graphics graphics;
Pen pen = new Pen(Color.Black, 3f);
private void SetSize()
{
Rectangle rectangle = Screen.PrimaryScreen.Bounds;
map = new Bitmap(rectangle.Width, rectangle.Height);
graphics = Graphics.FromImage(map);
pen.StartCap = System.Drawing.Drawing2D.LineCap.Round;
pen.EndCap = System.Drawing.Drawing2D.LineCap.Round;
}