public void UnregisterNode(long nodeID)
        {
            IBTNode node = null;

            _treeNodes.TryGetAndRemove(nodeID, out node);
            if (node != null)
            {
                node.NodeErrorEvent -= OnNodeErrorMessageHandler;
                this.ResetEvent     -= node.Reset;

                IBTNode[] allNodes = _treeNodes.GetValues();
                for (int i = 0; i < allNodes.Length; i++)
                {
                    IBTComposite cNode = allNodes[i] as IBTComposite;
                    if (cNode != null)
                    {
                        bool removed = cNode.RemoveChildNode(node);
                        if (removed)
                        {
                            return;
                        }
                    }
                }
            }
        }
Beispiel #2
0
 public void DrawPictureBoxesByDrawObjects()
 {
     DrawObjectList[] drls = null;
     lock (_canvasSync)
     {
         drls = _editPBDrawObjects.GetValues();
         if (drls == null)
         {
             return;
         }
         for (int i = 0; i < drls.Length; i++)
         {
             List <DrawObject> dl = drls[i].GetAllDrawObjects();
             for (int l = 0; l < dl.Count; l++)
             {
                 if (ToolDrawer.Draw(dl[l]))
                 {
                     _needUpdateFrontPicture = true;
                 }
             }
         }
     }
 }
Beispiel #3
0
 public TeamPainterTCPClient[] GetAllClients()
 {
     lock (_cSync) { return(_clients.GetValues()); }
 }
Beispiel #4
0
 public IConnector[] GetAllConnector()
 {
     lock (_cSync) {
         return(_connectors.GetValues());
     }
 }
Beispiel #5
0
 public PictureBoxObj[] GetAllPictureBoxes()
 {
     lock (_canvasSync) { return(_drawObjects.GetValues()); }
 }