예제 #1
0
        public void PlayFreeCursor(int ownId, int shapeId)
        {
            var freedShape = _doc.IdToShape(shapeId);

            if (freedShape != null)
            {
                freedShape.UnsetCursor();
            }
        }
예제 #2
0
        public void ApplyState(ShapeState st)
        {
            //bind caption shapes if not already bound
            if (st.ints[0] != -1 && _captions.text == null)
            {
                _captions.text = (VdText)_doc.IdToShape(st.ints[0]);
            }

            if (st.ints[1] != -1 && _captions.FreeDraw == null)
            {
                _captions.FreeDraw = (VdFreeForm)_doc.IdToShape(st.ints[1]);
            }

            //update relative caption positions
            _captions.textX     = st.doubles[0];
            _captions.textY     = st.doubles[1];
            _captions.freeDrawX = st.doubles[2];
            _captions.freeDrawY = st.doubles[3];
        }
예제 #3
0
        private void PlaySyncStateEvent(ShapeState state)
        {
            var sh = _doc.IdToShape(state.shapeId);

            if (sh == null)
            {
                //error of initialization (not all existing shapes were loaded to local station)
                return;
            }

            sh.ApplyState(state);
        }