예제 #1
0
        private void UploadFirstFloor()
        {
            _floor = _floorService.GetFloorList().FirstOrDefault();
            ReloadCollection(_viewModel.CameraCollection, _floor?.Cameras);

            if (null == _floor)
            {
                _floor       = _floorService.CreateEmptyFloor(DefaultFloorName);
                _currentMode = SettingsModes.CreatingNew;
            }
        }
예제 #2
0
 public void LoadFloorList()
 {
     foreach (var floor in _floorService.GetFloorList())
     {
         _viewModel.Floors.Add(floor);
     }
 }
예제 #3
0
        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());
            };
        }
예제 #4
0
 // GET: api/Floors
 public IEnumerable <FloorDTO> Get()
 {
     return(Service.GetFloorList().Select(floor => new FloorDTO(floor)));
 }