UndoEngine.CreateUndoUnit(String, Boolean) 方法

定義

建立新的 UndoEngine.UndoUnit

protected:
 virtual System::ComponentModel::Design::UndoEngine::UndoUnit ^ CreateUndoUnit(System::String ^ name, bool primary);
protected virtual System.ComponentModel.Design.UndoEngine.UndoUnit CreateUndoUnit (string name, bool primary);
protected virtual System.ComponentModel.Design.UndoEngine.UndoUnit CreateUndoUnit (string? name, bool primary);
abstract member CreateUndoUnit : string * bool -> System.ComponentModel.Design.UndoEngine.UndoUnit
override this.CreateUndoUnit : string * bool -> System.ComponentModel.Design.UndoEngine.UndoUnit
Protected Overridable Function CreateUndoUnit (name As String, primary As Boolean) As UndoEngine.UndoUnit

參數

name
String

要建立的單位名稱。

primary
Boolean

true 表示建立一系列巢狀單位的第一個,false 表示建立後續的巢狀單位。

傳回

具有指定名稱的新 UndoEngine.UndoUnit

備註

方法的預設實作 CreateUndoUnit 只會傳回新的 UndoEngine.UndoUnit

根據預設, UndoEngine 不會對 primary 參數執行任何動作,但某些復原實作,例如涉及 COM Microsoft.VisualStudio.OLE.Interop.IOleParentUndoUnit 設計模式的實作,可能需要識別主要單位與其子系之間的差異。

適用於