private bool VerifyMouseLocation(System.Drawing.Point mousePosition)
{
int x = mousePosition.X;
int y = mousePosition.Y;
// the mouse is outside the curtain grid area or at the edge of the curtain grid, just do nothing
if (x <= m_minX ||
y <= m_minY ||
x >= m_maxX ||
y >= m_maxY)
{
// set the cursor to the default cursor
// indicating that the mouse is outside the curtain grid area, and disables to draw U line
if (null != MouseOutGridEvent)
{
MouseOutGridEvent();
}
return false;
}
// set the cursor to the cursor of "Cross"
// indicating that the mouse is inside the curtain grid area, and enables to draw U line
if (null != MouseInGridEvent)
{
MouseInGridEvent();
}
return true;
}