Пример #1
0
        private void Page_Loaded(object sender, RoutedEventArgs e)
        {
            viewModel.LoadData();
            rocksOnWall = RockDataAccess.ValidRocksOnWall(AppGlobal.WallID);

            if (rocksOnWall.Any())
            {
                DrawRocksOnWallOnCanvas(rocksOnWall);
            }
            else
            {
                UiHelper.NotifyUser("No rocks registered with the wall!");
            }

            SetUpBtnCommandsInRockStatusUserControls();
        }
 private bool LoadRocksOnWall(string wallId)
 {
     rocksOnWall = RockDataAccess.ValidRocksOnWall(wallId).Select(rock =>
                                                                  new RockViewModel(rock, canvas, coorMap)).ToList();
     return(rocksOnWall.Any());
 }
Пример #3
0
 public void LoadData()
 {
     AgeGroups         = new ObservableCollection <AgeGroup>(AgeGroupDataAccess.ValidAgeGroups);
     RouteDifficulties = new ObservableCollection <RouteDifficulty>(RouteDifficultyDataAccess.ValidRouteDifficulties);
     RocksOnWall       = new ObservableCollection <Rock>(RockDataAccess.ValidRocksOnWall(AppGlobal.WallID));
 }