예제 #1
0
 //caption was removed
 public void InvalidateCaption(IVdShape caption)
 {
     if (caption == text)
         text = null;
     else if (caption == _freeDraw)
         _freeDraw = null;
 }
예제 #2
0
 void OnTextCleanup(int id, VdText text)
 {
     if (text.InitialOwner() == _palette.GetOwnerId())
     {
         Doc.BeginRemoveSingleShape(id);
     }
 }
예제 #3
0
        public TextUC(VdText vdText)
        {
            InitializeComponent();

            _vdText = vdText;

            field.Tag    = vdText;
            txtLabel.Tag = vdText;

            RemoveFocus();
        }
예제 #4
0
        public TextUC(VdText vdText)
        {
            InitializeComponent();

            _vdText = vdText;

            field.Tag    = vdText;
            txtLabel.Tag = vdText;

            RemoveFocus();
        }
예제 #5
0
 //caption was removed
 public void InvalidateCaption(IVdShape caption)
 {
     if (caption == text)
     {
         text = null;
     }
     else if (caption == _freeDraw)
     {
         _freeDraw = null;
     }
 }
예제 #6
0
        //if it's real-time creation, shape is locked by its owner.
        //if it's initial loading, we don't lock the shape,
        //lock requests will follow in this case
        public IVdShape PlayCreateShape(VdShapeType shapeType,
                                        int shapeId,
                                        int owner,
                                        double startX,
                                        double startY,
                                        bool takeCursor,
                                        // for badge creation events, it's false, as badges are created in private board
                                        int tag)
        {
            if (!_shapes.ContainsKey(shapeId))
            {
                //update id generator
                if (shapeType != VdShapeType.Badge)
                {
                    ShapeIdGenerator.Instance.CorrectLowBound(owner, shapeId);
                }

                IVdShape res = null;
                switch (shapeType)
                {
                case VdShapeType.Cluster:
                    res = new VdCluster(owner, shapeId, this, onClusterUncluster, OnClusterCleanup);
                    break;

                case VdShapeType.Text:
                    res = new VdText(startX, startY, owner, shapeId);
                    break;

                default:
                    res = DocTools.MakeShape(shapeType, owner, shapeId, startX, startY, tag);
                    break;
                }

                _shapePostHandler(res, shapeType);

                if (!_shapeVisibility)
                {
                    res.Hide();
                }

                this.Add(res);
                DocTools.SortScene(_scene);
                if (takeCursor)
                {
                    VolatileCtx.PlayTakeCursor(owner, shapeId);
                }
                return(res);
            }
            else
            {
                return(_shapes[shapeId]);
            }
        }
예제 #7
0
        private void OnTextEdited(VdText text)
        {
            var hostCluster = Doc.GetShapes()
                              .Where(sh => sh.ShapeCode() == VdShapeType.Cluster)
                              .FirstOrDefault(cl => cl.GetState(_doc.TopicId).ints[0] == text.Id());

            if (hostCluster != null)
            {
                _rt.clienRt.SendStatsEvent(StEvent.ClusterTitleEdited,
                                           _palette.GetOwnerId(),
                                           _doc.DiscussionId,
                                           _doc.TopicId,
                                           DeviceType.Wpf);
            }
        }
예제 #8
0
        //if it's real-time creation, shape is locked by its owner. 
        //if it's initial loading, we don't lock the shape,
        //lock requests will follow in this case 
        public IVdShape PlayCreateShape(VdShapeType shapeType,
                                        int shapeId, 
                                        int owner,
                                        double startX,
                                        double startY,
                                        bool takeCursor, // for badge creation events, it's false, as badges are created in private board 
                                        int tag)
        {
            if (!shapes.ContainsKey(shapeId))
            {
                //update id generator
                if (shapeType!=VdShapeType.Badge)
                    ShapeIdGenerator.Instance.CorrectLowBound(owner, shapeId);

                IVdShape res = null;
                switch (shapeType)
                {
                    case VdShapeType.Cluster:
                        res = new VdCluster(owner, shapeId, this, onClusterUncluster, OnClusterCleanup);
                        break;
                    case VdShapeType.Text:
                        res = new VdText(startX, startY, owner, shapeId, OnTextCleanup);
                        break;
                    default:
                        res = DocTools.MakeShape(shapeType, owner, shapeId, startX, startY, tag);
                        break;
                }                

                _shapePostHandler(res, shapeType);
                this.Add(res);
                DocTools.SortScene(_scene);
                if(takeCursor)
                    VolatileCtx.PlayTakeCursor(owner, shapeId);
                return res;
            }
            else
            {
                return shapes[shapeId];
            }
        }
예제 #9
0
 void OnTextFocusLost(VdText text)
 {
     StopManipulation(text, stopEvenForText: true);
 }
예제 #10
0
 private void OnTextChanged(VdText text)
 {
     SendSyncState(text);
 }
예제 #11
0
 void OnTextFocusLost(VdText text)
 {
     StopManipulation(text, stopEvenForText:true);
 }
예제 #12
0
        private void OnTextEdited(VdText text)
        {
            var hostCluster = Doc.GetShapes()
                .Where(sh => sh.ShapeCode() == VdShapeType.Cluster)
                .FirstOrDefault(cl => cl.GetState(_doc.TopicId).ints[0] == text.Id());

            if (hostCluster != null)
            {
                _rt.clienRt.SendStatsEvent(StEvent.ClusterTitleEdited,
                                           _palette.GetOwnerId(),
                                           _doc.DiscussionId,
                                           _doc.TopicId,
                                           DeviceType.Wpf);
            }
        }
예제 #13
0
 void OnTextCleanup(int id, VdText text)
 {
     if (text.InitialOwner()==_palette.GetOwnerId())
         Doc.BeginRemoveSingleShape(id);
 }
예제 #14
0
 private void OnTextChanged(VdText text)
 {
     SendSyncState(text);
 }
예제 #15
0
 void onTextChanged(VdText text)
 {          
     SendSyncState(text);
 }
예제 #16
0
 void onTextChanged(VdText text)
 {
     SendSyncState(text);
 }