/// <summary>
/// Method to dispatch the MouseMove event from the ScenePanel and forward it to
/// the current ViewCommand. It is responsible of updating the current view if
/// necessary and of setting the new tracking point for the active TrackingService.
/// </summary>
/// <param name="sender"></param>
/// <param name="e">MouseMove params</param>
void scenePanel_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e)
{
System.Diagnostics.Debug.Assert(mainFrm != null);
// Si el botón del mouse está apretado o es el SelectionCommand mandar evento
// (La selección lo necesita aunque no esté apretado para poder manejar el Tracking)
if ((viewCmd == SelectionCommand) || ((mainFrm.ScenePanel.Capture == true) && (viewCmd != null)))
{
GraphicViewManager gvm = GraphicViewManager.Instance;
GraphicView gv = gvm.ActiveView;
viewCmd.MouseMove(gv, e);
if (viewCmd != SelectionCommand)
{
gvm.UpdateView(gv);
}
else
{
// Notify and Paint trackers
if (TrackingController.MouseMove(this, e, gv))
{
gvm.Presenter.TrackingPaint(this, e, gv, TrackingController);
}
}
}
}