Beispiel #1
0
        protected void ProcessChild(IPosMappingScanNode node)
        {
            if (node.IsLeaf)
            {
                var moonItems = node.GetMoonItems();
                if (moonItems.Any())
                {
                    PosMapper.OnMoonsScanned(moonItems);
                }
                return;
            }

            PosMapper.AddNodeToScan(node);
        }
Beispiel #2
0
        private void InitialScan(IList <IDScanItem> obj)
        {
            CheckForOfflineTowers(obj);

            _currentNodeToScan = new DefaultPosMappingScanNode(this, PosMappingUtils.GetMoonGroups(obj),
                                                               new IDScanItem[0], obj);
            if (_currentNodeToScan.IsLeaf)
            {
                var moonItems = _currentNodeToScan.GetMoonItems();
                if (moonItems.Any())
                {
                    OnMoonsScanned(moonItems);
                }
                OnScanDone();
                return;
            }

            OnNextScanRequest(_currentNodeToScan.PivotalScanRangeInKm);
        }
Beispiel #3
0
        private void OnNewDScan(IList <IDScanItem> items)
        {
            if (!items.Any(item => item.IsMoon()) && items.Any(item => item.IsTower()))
            {
                OnNeedToDeselectOverviewSettings();
                return;
            }
            if (_currentNodeToScan == null)
            {
                InitialScan(items);
                return;
            }

            _currentNodeToScan.SetItemsOnPivotalScan(items);

            if (!_nodesToScan.Any())
            {
                OnScanDone();
                return;
            }

            _currentNodeToScan = _nodesToScan.Pop();
            OnNextScanRequest(_currentNodeToScan.PivotalScanRangeInKm);
        }
Beispiel #4
0
 public void AddNodeToScan(IPosMappingScanNode node)
 {
     _nodesToScan.Push(node);
 }
Beispiel #5
0
 public void Reset()
 {
     _nodesToScan.Clear();
     _currentNodeToScan = null;
 }