Beispiel #1
0
 public static DigitalWallDto GetDtoDigitalWallFromUcDigitalWall(UcDigitalWall UcDigitalWall)
 {
     return(new DigitalWallDto
     {
         Id = UcDigitalWall.WallId,
         Name = UcDigitalWall.Name,
         Width = UcDigitalWall.Width,
         Height = UcDigitalWall.Height
     });
 }
Beispiel #2
0
        public void TryProcessStartupCache()
        {
            //If we've already processed the startup cache, we don't need to.
            if (this._startupCacheProcessed)
            {
                return;
            }

            //If the startup cache does not contain all the necessary data, we can't process it yet.
            if ((this._startupCache.ContainsKey(StartupCacheKey.Sources) &&
                 this._startupCache.ContainsKey(StartupCacheKey.SourceInstances) &&
                 this._startupCache.ContainsKey(StartupCacheKey.DigitalWalls) &&
                 this._startupCache.ContainsKey(StartupCacheKey.SpaceSessions)) == false)
            {
                return;
            }

            this._unityMainThreadDispatcher.Enqueue(() =>
            {
                this._profile.Sources       = SourceMapper.GetUcSourceListFromDtoSourceList((IEnumerable <SourceDto>) this._startupCache[StartupCacheKey.Sources]);
                var sourceInstances         = SourceInstanceMapper.GetUcSourceInstanceListFromUcSourceListAndDtoSourceInstanceList(this._profile.Sources, (IEnumerable <SourceInstanceDto>) this._startupCache[StartupCacheKey.SourceInstances], this._commonValues.PixelToUnityUnitScale, this._unityMainThreadDispatcher);
                this._profile.DigitalWalls  = DigitalWallMapper.GetUcDigitalWallListFromDtoDigitalWallList(sourceInstances, (IEnumerable <DigitalWallDto>) this._startupCache[StartupCacheKey.DigitalWalls], this._commonValues.PixelToUnityUnitScale, this._commonValues.WallCenter, this._unityMainThreadDispatcher);
                this._profile.SpaceSessions = SpaceSessionMapper.GetUcSpaceSessionListFromUcDigitalWallListAndDtoSpaceSessionList(this._profile.DigitalWalls, (IEnumerable <SpaceSessionDto>) this._startupCache[StartupCacheKey.SpaceSessions]);

                //If we have any digital walls, render the first.
                UcDigitalWall firstWall = this._profile.DigitalWalls.FirstOrDefault();
                if (firstWall != null)
                {
                    firstWall.Render();
                    this._profile.SelectedWall = firstWall;
                }
            });


            this._startupCacheProcessed = true;
        }
Beispiel #3
0
        public async Task <int> AddDigitalWall(UcDigitalWall digitalWall)
        {
            int id = await HubProxy.Invoke <int>("AddDigitalWall", DigitalWallMapper.GetDtoDigitalWallFromUcDigitalWall(digitalWall));

            return(id);
        }
Beispiel #4
0
 public static UcSpaceSession GetUcSpaceSessionFromUcDigitalWallAndDtoSpaceSession(UcDigitalWall appropriateDigitalWall, SpaceSessionDto dtoSpaceSession)
 {
     return(new UcSpaceSession(dtoSpaceSession.Name, appropriateDigitalWall, dtoSpaceSession.Id));
 }