private void UploadFirstFloor() { _floor = _floorService.GetFloorList().FirstOrDefault(); ReloadCollection(_viewModel.CameraCollection, _floor?.Cameras); if (null == _floor) { _floor = _floorService.CreateEmptyFloor(DefaultFloorName); _currentMode = SettingsModes.CreatingNew; } }
public void LoadFloorList() { foreach (var floor in _floorService.GetFloorList()) { _viewModel.Floors.Add(floor); } }
private void GetServices(IMainService mainService) { _logger = mainService.GetLoggerInstance(); _floorService = mainService.GetFloorServiceInstance(); _cameraService = mainService.GetCameraServiceInstance(); _floorService.OnFloorListUpdated += delegate(object sender, UpdateFloorEventArgs e) { ReloadCollection(_viewModel.FloorCollection, _floorService.GetFloorList().ToList()); }; }
// GET: api/Floors public IEnumerable <FloorDTO> Get() { return(Service.GetFloorList().Select(floor => new FloorDTO(floor))); }