在为 MS Project 2010 开发插件时,如何在 Visual Studio C# 中为 editclear() 方法创建事件处理程序?
我正在 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
为了解决这个问题,我实现了 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.
我有同样的问题,但我使用
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 foundSelectionChange
. Maybe because I use MS Project 2013 AddIn. But thing is that there is no useful data going with the event (only passingProject
object). I only gotActiveCell
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:-)