共用方式為


IVsCompoundAction 介面

可建立複合的動作。

命名空間:  Microsoft.VisualStudio.TextManager.Interop
組件:  Microsoft.VisualStudio.TextManager.Interop (在 Microsoft.VisualStudio.TextManager.Interop.dll 中)

語法

'宣告
<GuidAttribute("B414D071-87BA-411A-9780-33FC7D87D882")> _
<InterfaceTypeAttribute()> _
Public Interface IVsCompoundAction
[GuidAttribute("B414D071-87BA-411A-9780-33FC7D87D882")]
[InterfaceTypeAttribute()]
public interface IVsCompoundAction
[GuidAttribute(L"B414D071-87BA-411A-9780-33FC7D87D882")]
[InterfaceTypeAttribute()]
public interface class IVsCompoundAction
[<GuidAttribute("B414D071-87BA-411A-9780-33FC7D87D882")>]
[<InterfaceTypeAttribute()>]
type IVsCompoundAction =  interface end
public interface IVsCompoundAction

IVsCompoundAction 類型會公開下列成員。

方法

  名稱 描述
公用方法 AbortCompoundAction 中止複合的動作。
公用方法 CloseCompoundAction 關閉複合的動作並設定一組要在單一的復原/取消復原單位加入群組動作的端點。
公用方法 FlushEditActions (大綱、 文字換行,等等) 的各種文字階層會更新時呼叫。
公用方法 OpenCompoundAction 開啟複合的動作,並設定一組要加入群組在單一的巨集的起始點復原/重做單位。

回頁首

備註

這個方法會允許複合的動作建立的物件所公開的。 複合的動作是一組動作,可以組合成一個單一的復原/取消復原單位。 例如,如果您呼叫OpenCompoundAction上檢視或緩衝區中,執行一組動作 (例如,變更文字),然後呼叫CloseCompoundAction,那麼所有的變更會放置在單一復原單位。 使用者接著可以選擇復原編輯 ] 功能表中或按下 CTRL + Z 組合鍵,而且所有這些變更將會回復在一起。

實作者注意事項

當需要啟用一組會分組在一個單一的復原/取消復原單位中的巨集時,允許複合的動作建立的物件會實作這個介面。

請參閱

參考

Microsoft.VisualStudio.TextManager.Interop 命名空間