C# 中的事件跟踪

发布于 2024-07-16 03:18:05 字数 377 浏览 2 评论 0原文

我想了解事件循环。 我有一个带有网格和文本框的表单。 它有一个绑定到 DataTable 的网格,也有绑定到同一个表的文本框。 我正在尝试调试某些内容,并且需要知道如何识别表单中触发的所有事件,以了解哪些事件可以为我解决问题。

无论如何,除非我明确地对表单上的每个类进行子类化,并将每个事件覆盖/附加到我自己的事件处理程序,否则我如何获取/侦听在某个操作期间触发的所有事件...例如更改“选定” DataGridView 中的道路。 它显然更新了自己的“CurrentRow”...我需要知道什么/如何强制重新加载相同的 CurrentRow。

原因:在表单级别“编辑模式”期间,我更改了另一个“文本框”控件中的内容,并拒绝更改,我需要它来模拟当前“记录”被重新加载以返回到其原始值。

I want to understand event cycles. I have a form with a grid and textboxes. It has a grid, bound to DataTable, and textboxes bound to same table too. I'm trying to debug something and need to know how to identify ALL events fired in the form to see what may solve an issue for me.

Anyhow, unless I explicitly subclass every class on my form, and override / attach to every event to my own event handlers, how can I get / listen to all events being fired during a certain action... Such as changing a "Selected" road in a DataGridView. It obviously updates its own "CurrentRow"... I need to know what / how to maybe FORCE a re-loading of SAME CurrentRow.

Reason: during a form level "Edit Mode", and I change the content in another "Textbox" control, and reject changes, I need it to simulate the current "Record" is reloaded to go back to its original values.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

凡尘雨 2024-07-23 03:18:05

您可以启动探查器并查看方法调用树。

You could fire up a profiler and look at the method call tree.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文