//caption was removed public void InvalidateCaption(IVdShape caption) { if (caption == text) text = null; else if (caption == _freeDraw) _freeDraw = null; }
void OnTextCleanup(int id, VdText text) { if (text.InitialOwner() == _palette.GetOwnerId()) { Doc.BeginRemoveSingleShape(id); } }
public TextUC(VdText vdText) { InitializeComponent(); _vdText = vdText; field.Tag = vdText; txtLabel.Tag = vdText; RemoveFocus(); }
//caption was removed public void InvalidateCaption(IVdShape caption) { if (caption == text) { text = null; } else if (caption == _freeDraw) { _freeDraw = null; } }
//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]); } }
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); } }
//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]; } }
void OnTextFocusLost(VdText text) { StopManipulation(text, stopEvenForText: true); }
private void OnTextChanged(VdText text) { SendSyncState(text); }
void OnTextFocusLost(VdText text) { StopManipulation(text, stopEvenForText:true); }
void OnTextCleanup(int id, VdText text) { if (text.InitialOwner()==_palette.GetOwnerId()) Doc.BeginRemoveSingleShape(id); }
void onTextChanged(VdText text) { SendSyncState(text); }