public static BrowserScrollPosition Read(Dictionary<byte, object> par)
 {
     var res = new BrowserScrollPosition
     {
         topicId = (int) par[(byte) DiscussionParamKey.ChangedTopicId]
     };
     return res;
 }
示例#2
0
        public static BrowserScrollPosition Read(Dictionary <byte, object> par)
        {
            var res = new BrowserScrollPosition
            {
                topicId = (int)par[(byte)DiscussionParamKey.ChangedTopicId]
            };

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

            return(res);
        }
示例#5
0
        public void SendBrowserScrolled(BrowserScrollPosition req)
        {
            if (peer == null || peer.PeerState != PeerStateValue.Connected)
                return;

            peer.OpCustom((byte)DiscussionOpCode.BrowserScrollChanged,
                          req.ToDict(),
                          true);
        }
 private void OnBrowserScroll(BrowserScrollPosition scroll)
 {
     if (_mediator.CurrentTopicId != null &&
         _mediator.CurrentTopicId == scroll.topicId &&
         _mediator.ExplanationModeEnabled)
     {
         var newScrollState = new Point(scroll.X, scroll.Y);
         {
             ScrollBrowserTo(newScrollState);
             _skipNextScrollPosChange = true;
         }
     }
 }
示例#7
0
 public void HandleBrowserScrollSubmitted(LitePeer peer,
                                        BrowserScrollPosition req,
                                        OperationRequest operationRequest,
                                        SendParameters sendParameters)
 {            
     _doc.BrowserScrollbarPosition = req;
     _room.Broadcast(peer,
                     req.ToDict(),
                     sendParameters,
                     (byte)DiscussionEventCode.BrowserScrollChangedEvent);
 }