public void ClearNodes() { lock (bubbleDictionary) { foreach (long oid in bubbleDictionary.Keys) { BubbleTextNode node = bubbleDictionary[oid]; window.RemoveChild(node.Widget); node.Dispose(); } bubbleDictionary.Clear(); } }
public void RemoveNode(long oid) { lock (bubbleDictionary) { if (!bubbleDictionary.ContainsKey(oid)) { return; } BubbleTextNode node = bubbleDictionary[oid]; window.RemoveChild(node.Widget); bubbleDictionary.Remove(oid); node.Dispose(); } }