Exemple #1
0
        /*--------------------------------------------------------------------------------------------*/
        internal bool SetAsNearestSegment(bool pIsNearest)
        {
            IsNearestHighlight = pIsNearest;

            if (!pIsNearest || SelectionProgress <= 0)
            {
                NavItem.DeselectStickySelections();
            }

            if (!pIsNearest || HighlightProgress < 1)
            {
                vSelectionStart      = null;
                IsSelectionPrevented = false;
                return(false);
            }

            if (IsSelectionPrevented || !NavItem.AllowSelection)
            {
                vSelectionStart = null;
                return(false);
            }

            if (vSelectionStart == null)
            {
                vSelectionStart = DateTime.UtcNow;
                return(false);
            }

            if (SelectionProgress < 1)
            {
                return(false);
            }

            vSelectionStart        = null;
            IsSelectionPrevented   = true;
            vDistanceUponSelection = HighlightDistance;
            NavItem.Select();
            return(true);
        }