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);
        }
        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;
        }
示例#3
0
        public void SendImageViewerStateRequest(ImageViewerStateRequest req)
        {
            if (peer == null || peer.PeerState != PeerStateValue.Connected)
                return;

            peer.OpCustom((byte)DiscussionOpCode.ImageViewerStateRequest,
                          req.ToDict(),
                          true);
        }
示例#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);                       
 }