예제 #1
0
 public void ClearNodes()
 {
     lock (nameDictionary) {
         foreach (long oid in nameDictionary.Keys)
         {
             NameNode node = nameDictionary[oid];
             window.RemoveChild(node.Widget);
             node.Dispose();
         }
         nameDictionary.Clear();
     }
 }
예제 #2
0
 public void RemoveNode(long oid)
 {
     lock (nameDictionary) {
         if (!nameDictionary.ContainsKey(oid))
         {
             return;
         }
         NameNode node = nameDictionary[oid];
         window.RemoveChild(node.Widget);
         node.Dispose();
         nameDictionary.Remove(oid);
     }
 }