Exemplo n.º 1
0
 private void ReleaseControl()
 {
     if (_controlling)
     {
         ConcealedSpace.Put("ControlLock", CollectionIdentifier, NumberOfPages);
     }
     _controlling          = false;
     SlideShower.InControl = false;
 }
Exemplo n.º 2
0
        private void AssumeControl()
        {
            var tuple = ConcealedSpace.Get("ControlLock", typeof(string), typeof(int));

            CollectionIdentifier  = tuple.Get <string>(1);
            NumberOfPages         = tuple.Get <int>(2);
            _controlling          = true;
            SlideShower.InControl = true;
            SlideShower.NewCollection(NumberOfPages);
        }
Exemplo n.º 3
0
 private void Broadcast()
 {
     while (true)
     {
         var request  = Space.Get("FramePayloadRequest", CollectionIdentifier, typeof(string), typeof(int));
         var username = request.Get <string>(2);
         var page     = request.Get <int>(3);
         var token    = Guid.NewGuid().ToString();
         var tuple    = ConcealedSpace.QueryP("Frame", page, typeof(FramePayload));
         var payload  = tuple.Get <FramePayload>(2);
         ConcealedSpace.Put("UnauthenticatedFramePayload", username, token, payload);
     }
 }
Exemplo n.º 4
0
        private void SetupSlides(IEnumerable <byte[]> imageBitstreams)
        {
            FlushFrames();
            CollectionIdentifier = Guid.NewGuid().ToString();
            ConcealedSpace.Put("ControlLock", CollectionIdentifier, imageBitstreams.Count());
            ConcealedSpace.Put("ActiveCollection", CollectionIdentifier, imageBitstreams.Count());
            SlideShower.NewCollection(imageBitstreams.Count());
            var i = 1;

            foreach (var bs in imageBitstreams)
            {
                ConcealedSpace.Put("Frame", i, new FramePayload {
                    PageNumber = i++, Bitstream = bs
                });
            }
            Running = true;
        }
Exemplo n.º 5
0
 private void FlushFrames()
 {
     ConcealedSpace.GetAll("ActiveCollection", typeof(string), typeof(int));
     ConcealedSpace.GetAll("Frame", typeof(int), typeof(FramePayload));
 }