[英]C# Visual Studio add-in - detect when saving document
我正在使用Visual Studio 11加載項。 通過代碼,如何檢測當前活動文檔的保存時間? 我不知道從哪里開始,在網上也找不到任何關於它的信息。
我在使用VS10-addin時遇到了同樣的問題,找到了這個解決方案,希望它也對您有用...
public void OnConnection(object application, ext_ConnectMode connectMode, object addInInst, ref Array custom)
{
_applicationObject = (DTE2)application;
_addInInstance = (AddIn)addInInst;
// Hook save changes event
_applicationObject.Events.DocumentEvents.DocumentSaved += DocumentEvents_DocumentSaved;
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.