public void RemoveChild(DevExpress.XtraTreeList.Nodes.TreeListNode node, ref bool remove)
 {
     remove = false;
     try
     {
         if (node.Nodes.Count > 0)
         {
             for (int i = 0; i < node.Nodes.Count; i++)
             {
                 RemoveChild(node.Nodes[i], ref remove);
                 if (remove)
                 {
                     i--;
                 }
             }
         }
         else if (node.Tag.ToString() != "Layer")
         {
             node.Remove();
             remove = true;
         }
     }
     catch
     { }
 }
 /// <summary>
 /// 移除节点后,判断其父节点是否也需要移除
 /// </summary>
 /// <param name="node"></param>
 public void Remove(DevExpress.XtraTreeList.Nodes.TreeListNode node)
 {
     try
     {
         if (node.PrevNode.Nodes.Count == 1)// && node.PrevNode. != "Root")
         {
             Remove(node.PrevNode);
         }
         else
         {
             node.Remove();
         }
     }
     catch
     { }
 }