예제 #1
0
 private void ClearList()
 {
     _sectorObjects.Clear();
     _levelObjects.Clear();
     CurrentList.Clear();
     PreviousList.Clear();
 }
예제 #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);
        }
예제 #3
0
        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;
            }
        }
예제 #4
0
 public void Clear()
 {
     CurrentList.Clear();
     Pending.Clear();
 }
예제 #5
0
 public void Swap()
 {
     CurrentList.Clear();
     CurrentList.AddRange(Pending);
 }
예제 #6
0
 public virtual void Clear()
 {
     CurrentList.Clear();
     PreviousList.Clear();
 }
예제 #7
0
 public void Advance()
 {
     _currentIndex = _currentIndex == 0 ? 1 : 0;
     CurrentList.Clear();
 }