示例#1
0
 public static PdfScrollPosition Read(Dictionary<byte, object> par)
 {
     var res = new PdfScrollPosition
     {
         ownerId = (int) par[(byte) DiscussionParamKey.ShapeOwnerId],
         X = (double)par[(byte)DiscussionParamKey.OffsetXKey],
         Y = (double)par[(byte)DiscussionParamKey.OffsetYKey],
         Zoom = (float)par[(byte)DiscussionParamKey.Zoom],
         topicId = (int) par[(byte) DiscussionParamKey.ChangedTopicId]
     };
     return res;
 }
        public static PdfScrollPosition Read(Dictionary <byte, object> par)
        {
            var res = new PdfScrollPosition
            {
                ownerId = (int)par[(byte)DiscussionParamKey.ShapeOwnerId],
                X       = (double)par[(byte)DiscussionParamKey.OffsetXKey],
                Y       = (double)par[(byte)DiscussionParamKey.OffsetYKey],
                Zoom    = (float)par[(byte)DiscussionParamKey.Zoom],
                topicId = (int)par[(byte)DiscussionParamKey.ChangedTopicId]
            };

            return(res);
        }
示例#3
0
        public void SendPdfScrolled(int ownerId, double x, double y, float zoom, int topicId)
        {
            if (peer == null || peer.PeerState != PeerStateValue.Connected)
                return;

            var req = new PdfScrollPosition {ownerId = ownerId, topicId = topicId, X = x, Y = y, Zoom = zoom};
            peer.OpCustom((byte)DiscussionOpCode.PdfScrollChanged,
                          req.ToDict(),
                          true);
        }
示例#4
0
 private void OnPdfScroll(PdfScrollPosition scroll)
 {
     //if (_mediator.CurrentTopicId != null &&
     //    _mediator.CurrentTopicId == scroll.topicId &&
     //    _mediator.ExplanationModeEnabled)
     //{
     //    ScrollTo(scroll.Y);
     //    _skipNextScrollPosChange = true;
     //}
 }
示例#5
0
        private void OnPdfScroll(PdfScrollPosition scroll)
        {
            if (_mediator.CurrentTopicId != null &&
                _mediator.CurrentTopicId == scroll.topicId &&
                _mediator.ExplanationModeEnabled)
            {
                _recentSyncedScrollX = scroll.X;
                _recentSyncedScrollY = scroll.Y;
                _recentSyncedZoom = scroll.Zoom;

                SetView(scroll.X, scroll.Y, scroll.Zoom);
            }
        }
示例#6
0
 public void HandlePdfScrollSubmitted(LitePeer peer,
                                       PdfScrollPosition req,
                                       OperationRequest operationRequest,
                                       SendParameters sendParameters)
 {
     _doc.PdfScrollPosition = req;
     _room.Broadcast(peer,
                     req.ToDict(),
                     sendParameters,
                     (byte)DiscussionEventCode.PdfScrollChangedEvent);
 }