public void ChangingMarkedObjectStatus(IRxObject obj) { if (obj.Marked) { //MarkedObjects.Add(obj); if (obj.IRxType() == IRxObjectType.Node) { decorateMarkedNode(obj as Node); } else if (obj.IRxType() == IRxObjectType.Edge) { //obj.invalidate(); decorateMarkedEdge(obj as Edge); } else // NodeBox { decorateMarkedNodeBox(obj as NodeBox); } } else { //MarkedObjects.Remove(obj); undecorateObject(obj); } }
public void undecorateObject(IRxObject obj) { if (!markedObjectDecorator.Contains(obj)) { return; } markedObjectDecorator.Remove(obj); switch (obj.IRxType()) { case IRxObjectType.Edge: break; case IRxObjectType.Node: (obj as Node).borderStrokeThickness /= 2; break; case IRxObjectType.NodeBox: (obj as NodeBox).borderStrokeThickness /= 2; break; } obj.invalidate(); }