static void Main(string[] args) { bool EndPointPending = false; //Am I in the middle of drawing a line? Point StartPoint = new Point(); Point EndPoint = new Point(); Point FillPoint = new Point(); Draw.Scale = 10; for (;;) { if (!EndPointPending) { if (Draw.GetLastMouseLeftClickScaled(out StartPoint)) { EndPointPending = true; } } else { if (Draw.GetLastMouseLeftClickScaled(out EndPoint)) { EndPointPending = false; AddBBLineScaled(StartPoint, EndPoint, Color.Blue); } } if (Draw.GetLastMouseRightClickScaled(out FillPoint)) { FloodFill(FillPoint, Color.Red); } } if (Debugger.IsAttached) { Console.ReadKey(); } }