回复 20楼 csyx
哈哈!是的,这个比喻好形象
2022-07-13 19:05
[此贴子已经被作者于2022-7-14 18:42编辑过]
2022-07-14 18:22
程序代码:Lparameters oNode,tcSelectKey
Local oCurNode,ChildKey
a = Alltrim(oNode.Key)
Messagebox(a+tcSelectKey,0,"")
If a == Alltrim(tcSelectKey)
Messagebox("相同了,找到啦!",0,"")
Return .F. &&这里应该退出了,并返回.T.,但是还是会继续下去,直至最后
Endif
If oNode.Children > 0
oCurNode = oNode.Child
Do While !Isnull(oCurNode) and This.findTreeNode(oCurNode,tcSelectKey)
oCurNode = oCurNode.Next
Enddo
Endif
2022-07-14 19:41
[此贴子已经被作者于2022-7-14 20:18编辑过]
2022-07-14 20:07
[此贴子已经被作者于2022-7-14 20:27编辑过]
2022-07-14 20:25
2022-07-14 20:38
程序代码:Lparameters oNode,tcSelectKey
Local oCurNode,ChildKey,isIndetical
isIdentical = .F.
*ChildKey = oNode.Key
a = Alltrim(oNode.Key)
Messagebox(a+tcSelectKey,0,"")
If a == Alltrim(tcSelectKey)
isIndetical = .T.
Messagebox("相同了,找到啦!",0,"")
isCheck = .T. &&加了这个
Return isIndetical
Endif
If oNode.Children > 0
oCurNode = oNode.Child
Do While !Isnull(oCurNode)
If isCheck = .t. &&判断
Exit
Else
This.findTreeNode(oCurNode,tcSelectKey)
oCurNode = oCurNode.Next
EndIf
Enddo
Endif
Return isIndetical[此贴子已经被作者于2022-7-14 20:42编辑过]
2022-07-14 20:41
2022-07-14 20:51
2022-07-14 20:54
2022-07-14 21:06