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);
        }
Пример #6
0
 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);
 }