Exemple #1
0
 private void ClearList()
 {
     _sectorObjects.Clear();
     _levelObjects.Clear();
     CurrentList.Clear();
     PreviousList.Clear();
 }
Exemple #2
0
        private void UpdatePlayerPosition()
        {
            //TODO: this needs to be more global
            if (!IsActive)
            {
                return;
            }
            var playPos = Player.Tr.position.WorldToGenericGrid(_sectorSize);

            if (playPos == _playerPosition)
            {
                return;
            }
            _playerPosition = playPos;
            _currentIndex   = _currentIndex == 0 ? 1 : 0;
            CurrentList.Clear();
            CurrentList.Add(_playerPosition);
            for (int i = 0; i < DirectionsExtensions.DiagonalLength; i++)
            {
                var pos = _playerPosition + ((DirectionsEight)i).ToP3();
                CurrentList.Add(pos);
            }
            SetList(true);
            SetList(false);
        }
        public async Task ExecuteLoadItemsCommand()
        {
            IsBusy = true;

            try
            {
                var list1 = await _canteenService.GetMenuOrderListCurrentAsync();

                var list2 = await _canteenService.GetMenuOrderListNextAsync();

                CurrentList.Clear();
                CurrentList.Add(new MenuOrderList {
                    WeekList = new ObservableCollection <MenuOrder>(list1)
                });
                CurrentList.Add(new MenuOrderList {
                    WeekList = new ObservableCollection <MenuOrder>(list2)
                });
                CurrentList.Add(new MenuOrderList {
                    WeekList = null
                });
            }
            catch (Exception ex)
            {
                Debug.WriteLine(ex);
            }
            finally
            {
                IsBusy = false;
            }
        }
Exemple #4
0
 public void Clear()
 {
     CurrentList.Clear();
     Pending.Clear();
 }
Exemple #5
0
 public void Swap()
 {
     CurrentList.Clear();
     CurrentList.AddRange(Pending);
 }
Exemple #6
0
 public virtual void Clear()
 {
     CurrentList.Clear();
     PreviousList.Clear();
 }
Exemple #7
0
 public void Advance()
 {
     _currentIndex = _currentIndex == 0 ? 1 : 0;
     CurrentList.Clear();
 }