示例#1
0
 void setCursor(Canguro.Controller.WaitingFor selectionFilter)
 {
     // Set cursor
     if (selectionFilter == Canguro.Controller.WaitingFor.Point)
     {
         cursor = cursorSelect;
     }
     else if ((selectionFilter == Canguro.Controller.WaitingFor.SimpleValue) ||
              (selectionFilter == Canguro.Controller.WaitingFor.Text) ||
              (selectionFilter == Canguro.Controller.WaitingFor.None))
     {
         cursor = cursorDefault;
     }
     else
     {
         cursor = cursorPick;
     }
 }
示例#2
0
        void endWindowSelection(bool performSelection, Canguro.View.GraphicView activeView, Canguro.Controller.WaitingFor wf)
        {
            if (performSelection)
            {
                if (wfx > fx)
                {
                    int ffx = fx;
                    fx  = wfx;
                    wfx = ffx;
                }
                if (wfy > fy)
                {
                    int ffy = fy;
                    fy  = wfy;
                    wfy = ffy;
                }

                SelectWindow(activeView, wfx, wfy, fx, fy, null, Canguro.Controller.SelectionFilter.Joints | Canguro.Controller.SelectionFilter.Lines | Canguro.Controller.SelectionFilter.Areas);

                // TODO: Esto no está del todo bien porque avisa directo al Modelo
                if (newlySelected)
                {
                    Canguro.Model.Model.Instance.ChangeSelection(null);
                }
            }

            if (windowSelectionOn)
            {
                endTracking();
            }

            windowSelectionOn   = false;
            newlySelected       = false;
            crossingSelectionOn = false;

            resetCursor();
        }