Exemplo n.º 1
0
        /// <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);
                    }
                }
            }
        }
Exemplo n.º 2
0
        void timerCallback(object stateInfo)
        {
            showingTooltip = !showingTooltip;

            Controller         controller = Controller.Instance;
            GraphicViewManager gvm        = GraphicViewManager.Instance;

            //gvm.Presenter.TrackingPaintImmediately(this, null, gvm.ActiveView, controller.TrackingController);
            gvm.Presenter.TrackingPaint(this, null, gvm.ActiveView, controller.TrackingController);
        }
Exemplo n.º 3
0
 /// <summary>
 /// Method to dispatch active view change events. This occurs when another view
 /// is selected, the view gets resized, the layout changes, etc.
 /// It resets the Selection Command.
 /// </summary>
 /// <param name="sender">The GraphicViewManager</param>
 /// <param name="e">Empty argument</param>
 void spinteraction_ActiveViewChange(object sender, GraphicViewManager.ActiveViewChangedEventArgs e)
 {
     if (viewCmd == SelectionCommand)
     {
         SelectionCommand.Reset();
         GraphicViewManager.Instance.UpdateView();
         TrackingController.Reset(e.NewView);
         mainFrm.ScenePanel.Cursor = viewCmd.Cursor;
     }
 }