public static ImageViewerStateRequest Read(Dictionary <byte, object> par)
        {
            var res = new ImageViewerStateRequest
            {
                OwnerId           = (int)par[(byte)DiscussionParamKey.ShapeOwnerId],
                TopicId           = (int)par[(byte)DiscussionParamKey.ChangedTopicId],
                ImageAttachmentId = (int)par[(byte)DiscussionParamKey.AttachmentId]
            };

            return(res);
        }
Exemplo n.º 2
0
        public static ImageViewerStateRequest Read(Dictionary<byte, object> par)
        {
            var res = new ImageViewerStateRequest
                {
                    OwnerId = (int) par[(byte) DiscussionParamKey.ShapeOwnerId],
                    TopicId = (int) par[(byte) DiscussionParamKey.ChangedTopicId],
                    ImageAttachmentId = (int) par[(byte) DiscussionParamKey.AttachmentId]
                };

            return res;
        }
Exemplo n.º 3
0
        public void SendImageViewerStateRequest(ImageViewerStateRequest req)
        {
            if (peer == null || peer.PeerState != PeerStateValue.Connected)
                return;

            peer.OpCustom((byte)DiscussionOpCode.ImageViewerStateRequest,
                          req.ToDict(),
                          true);
        }
Exemplo n.º 4
0
 public void HandleImageViewerStateRequest(LitePeer peer,
                                         ImageViewerStateRequest req,
                                         OperationRequest operationRequest,
                                         SendParameters sendParameters)
 {
     var state  = _doc.GetImageViewer(req.ImageAttachmentId);
     if (state!=null)
         _room.PublishEventToSingle(peer, 
                                    state.ToDict(), 
                                    sendParameters, 
                                    (byte)DiscussionEventCode.ImageViewerManipulatedEvent);                       
 }