在为 MS Project 2010 开发插件时,如何在 Visual Studio C# 中为 editclear() 方法创建事件处理程序?

发布于 2024-12-28 17:53:59 字数 251 浏览 2 评论 0原文

我正在 Visual Studio 2010 C# 中为 MS Project 2010 开发插件。当我使用“删除”按钮清除 MS Project 中任务字段的内容时,不会发生 ProjectBeforeTaskChange 事件。当按下“删除”按钮时,将调用 editclear 方法,并且 Visual Studio 中没有此操作的事件。我想也许我可以在调用 editclear 时创建一个事件处理程序。你知道我该怎么做吗?或者还有其他解决方案吗?

任何建议表示赞赏。

I am developing an addin for MS Project 2010 in Visual Studio 2010 C#. The event ProjectBeforeTaskChange does not occur when I clear the content of a task field in MS Project by using "Delete" button. When the "Delete" button is pressed the editclear method is called and there is no event for this action in Visual Studio. I thought that probably I can make an event handler when editclear is called. Do you know how can I do this ? or is there any other solution ?

Any suggestions are appreciated.

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

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

发布评论

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

评论(2

鹿港小镇 2025-01-04 17:53:59

为了解决这个问题,我实现了 SelectionChange 事件,在该事件中我检查字段的值是否已更改。

In order to solve this issue, I have implemented the SelectionChange event in which I am checking if the value of a field has been changed.

遇到 2025-01-04 17:53:59

我有同样的问题,但我使用 event _EProjectDoc_ChangeEventHandler Change 因为我还没有找到 SelectionChange。也许是因为我使用 MS Project 2013 AddIn。但问题是,事件中没有有用的数据(仅传递 Project 对象)。我只得到了 ActiveCell ,它并不总是被更改的,例如,当按 Enter 时,活动单元格是下面的一个。

编辑:我发现属性 applcation.MoveAfterReturn 设置为 false,在按 Enter 键后保持当前选择处于活动状态:-)

I have the same problem, but I use event _EProjectDoc_ChangeEventHandler Change because I haven't found SelectionChange. Maybe because I use MS Project 2013 AddIn. But thing is that there is no useful data going with the event (only passing Project object). I only got ActiveCell which is not always the one that was changed, e.g. when pressing enter active cell is one below.

edit: I've found property applcation.MoveAfterReturn which set to false, remains current selection active after pressing enter:-)

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