Revit.SDK.Samples.CurtainWallGrid.CS.GridDrawing.SelectLine C# (CSharp) Метод

SelectLine() публичный Метод

pick up a grid line by mouse
public SelectLine ( System mousePosition, bool verifyLock, bool verifyRemove ) : void
mousePosition System /// the location of the mouse cursor ///
verifyLock bool /// will locked grid lines be picked (if verifyLock is true, won't pick up locked ones) ///
verifyRemove bool /// whether grid line without skipped segments be picked (if verifyRemove is true, won't pick up the grid line without skipped segments) ///
Результат void
        public void SelectLine(System.Drawing.Point mousePosition, bool verifyLock, bool verifyRemove)
        {
            bool mouseInGrid = VerifyMouseLocation(mousePosition);

             // mouse is outside the curtain grid boundary
             if (false == mouseInGrid)
             {
            return;
             }

             // select the U grid line
             SelectULine(mousePosition, verifyLock, verifyRemove);

             // necessary
             // supposing the mouse hovers on the cross point of a U line and a V line, just handle
             // the U line, skip the V line
             // otherwise it allows users to select "2" cross lines at one time
             if (-1 != m_selectedUIndex)
             {
            return;
             }

             // select the V grid line
             SelectVLine(mousePosition, verifyLock, verifyRemove);
        }