PrintDocument for WinForms
AddCurrentViewStateToHistory メソッド (C1PreviewPane)


C1.Win.PrintPreview.6 アセンブリ > C1.Win.C1Preview 名前空間 > C1PreviewPane クラス : AddCurrentViewStateToHistory メソッド
A HistorySavedActionsEnum value defining the user action associated with the new history item.
The caption of the new history item.
If true, forces adding of the current state even if it is equal to the state stored in the C1PreviewPane.CurrentHistoryEntry.
Creates a new ViewHistoryItem object using the current state of the C1PreviewPane.

The newly created object is then added to the C1PreviewPane.ViewHistory collection. Adding of the new state to history is cancelled if the C1PreviewPane.Document property of the current preview pane is null, or if the specified action should not be saved according to the HistoryOptions.SavedActions value of the current pane's C1PreviewPane.HistoryOptions.

Adding of the new state to history can also be cancelled in the C1PreviewPane.HistoryItemAdding event.

シンタックス
'宣言
 
Public Function AddCurrentViewStateToHistory( _
   ByVal userAction As HistorySavedActionsEnum, _
   ByVal historyItemCaption As System.String, _
   ByVal force As System.Boolean _
) As ViewHistoryItem
'使用法
 
Dim instance As C1PreviewPane
Dim userAction As HistorySavedActionsEnum
Dim historyItemCaption As System.String
Dim force As System.Boolean
Dim value As ViewHistoryItem
 
value = instance.AddCurrentViewStateToHistory(userAction, historyItemCaption, force)
public ViewHistoryItem AddCurrentViewStateToHistory( 
   HistorySavedActionsEnum userAction,
   System.string historyItemCaption,
   System.bool force
)

パラメータ

userAction
A HistorySavedActionsEnum value defining the user action associated with the new history item.
historyItemCaption
The caption of the new history item.
force
If true, forces adding of the current state even if it is equal to the state stored in the C1PreviewPane.CurrentHistoryEntry.

戻り値の型

The newly created ViewHistoryItem object, or null if the action was cancelled.
参照

C1PreviewPane クラス
C1PreviewPane メンバ