Exemplo n.º 1
0
        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;
                        }
                    }
                }
            }
        }
Exemplo n.º 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;
                 }
             }
         }
     }
 }
Exemplo n.º 3
0
 public TeamPainterTCPClient[] GetAllClients()
 {
     lock (_cSync) { return(_clients.GetValues()); }
 }
Exemplo n.º 4
0
 public IConnector[] GetAllConnector()
 {
     lock (_cSync) {
         return(_connectors.GetValues());
     }
 }
Exemplo n.º 5
0
 public PictureBoxObj[] GetAllPictureBoxes()
 {
     lock (_canvasSync) { return(_drawObjects.GetValues()); }
 }