private void deleteItemInSub(DisableGetObjects.IConfigSwitchOrGroup father, DisableGetObjects.IConfigSwitchOrGroup whattodel)
 {
     if (!father.IfHaveNextItems())
     {
         return;
     }
     foreach (var m in father.NextItems())
     {
         if (m == whattodel)
         {
             List<DisableGetObjects.IConfigSwitchOrGroup> w = new List<DisableGetObjects.IConfigSwitchOrGroup>(father.NextItems());
             w.Remove(whattodel);
             father.SetItemList(w.ToArray());
             return;
         }
         else
         {
             deleteItemInSub(m, whattodel);
         }
     }
 }
        private TreeNode buildtree(DisableGetObjects.IConfigSwitchOrGroup datainput)
        {
            TreeNode result = new TreeNode(datainput.GetNowItemName());

            result.Tag = datainput;
            if (datainput.IfHaveNextItems())
            {
                var datanext = datainput.NextItems();
                foreach (var p in datanext)
                {
                    result.Nodes.Add(buildtree(p));
                }
            }
            return result;
        }