public void DoMouseMove(MouseEventArgs e, Control ctr)
{
bool dirty = false;
foreach (Interactions.Interaction i in interactions_)
{
i.DoMouseMove(e, ctr, lastKeyEventArgs_);
dirty |= i.DoMouseMove(e, ctr, lastKeyEventArgs_);
}
if (dirty)
{
Refresh();
}
// Update coordinates if necessary.
if (coordinates_.Active)
{
// we are here
Point here = new Point(e.X, e.Y);
if (ps_.PlotAreaBoundingBoxCache.Contains(here))
{
coordinates_.ShowAlways = true;
// according to Måns Erlandson, this can sometimes be the case.
if (this.PhysicalXAxis1Cache == null)
return;
if (this.PhysicalYAxis1Cache == null)
return;
double x = this.PhysicalXAxis1Cache.PhysicalToWorld(here, true);
double y = this.PhysicalYAxis1Cache.PhysicalToWorld(here, true);
string s = "";
if (!DateTimeToolTip)
{
s = "(" + x.ToString("g4") + "," + y.ToString("g4") + ")";
}
else
{
DateTime dateTime = new DateTime((long)x);
s = dateTime.ToShortDateString() + " " + dateTime.ToLongTimeString() + Environment.NewLine + y.ToString("f4");
}
//Bug fix. Windows 7 will do an infinate loop if this is set.
if (coordinates_.GetToolTip(this) != s)
coordinates_.SetToolTip(this, s);
}
else
{
coordinates_.ShowAlways = false;
}
}
}