找不到按钮点击 [英] cannot find button click

查看:74
本文介绍了找不到按钮点击的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我提供的代码非常糟糕。无论如何,这个家伙使用WPF并且他拥有他制作的所有这些.dll文件使得他很难遵循他的代码。当我运行该程序时,会出现一个wpf表单(我称之为Idk),我看到一个按钮
我必须按。问题是,我无论如何都无法提交点击按钮代码!我想在调试模式下抛出代码,所以当你点击按钮但我无法在任何地方找到它时,我可以看到他在做什么。太奇怪了。我有
.dll文件的源文件,我在另一个窗口中打开它们。过了一会儿,我找到了按钮所在的位置。他的主要"形式"使用其他wfp"形式"太奇怪了。 我找到了按钮的位置,但我没有看到它的点击事件...
所以我不知道这是如何工作的。它在调试模式下运行时确实有效。那我怎么才能找到他的按钮点击功能?


我找到了按钮的名称,我搜索了它,但我找不到它正在使用的地方。我担心它可能会被用在其他.dll文件中,但是有很多文件需要永远才能找到它。



关于如何找到按钮点击事件的任何想法?


请帮助...


 

解决方案

微软并不容易。他们认为没有必要做那样的事情。特别是,我们可以添加和删除事件处理程序,但微软(

EventHandlerList类
)不告诉我们存在哪些事件处理程序。


这看起来似乎很多,但你应该只看一下窗口和按钮的所有引用(出现)。这可能需要一段时间,但您最终会找到它,您可能会了解该过程中的应用程序。如果您
找到了该窗口的使用而您找不到它的源代码,那么您就知道需要找到它。



I was giving this code that is written really badly. anyhow the guy used WPF and he has all these .dll files he made with makes it very hard to follow his code. When I run the program, a wpf form comes up ( Idk what you call it ) and I see a button that I have to press. the problem is, I cannot file the click button code anyway !!! I want to walk throw the code in debug mode, so I can see what he is doing when you click the button but I cant find it anywhere. it is so weird. I have the source files for the .dll files and I open them in another window. and after a while I found where the button is make at. His main "form" using other wfp "forms" it is so weird.  I found where the button is make but I do not see a click event for it... so I have no idea how this works. it does work when I run it in debug mode. so how can I find his button click function?

I found the name of the button and I did a search for it but I could not find where else it is being used. I fear it might be used in an other .dll file he made, but there some many of them it was take forever to find it.

any ideas on how, I cant find the button click event ?

please help...

 

解决方案

Microsoft does not make it easy. They don't think there is a need to do something like that. In particular, we can add and remove event handlers but Microsoft (the EventHandlerList Class) does not let us know what event handlers exist.

It might seem like a lot of work but you should just look at all references (occurrences) of the window and the button. It might take time to do but you will find it eventually and you might learn about the application in the process. If you find a use of the window and you can't find the source code for it then you know you need to find it.


这篇关于找不到按钮点击的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆