Class HistoryTransactionCommand
Holds a collection of HistoryCommandBase objects that should all be executed together as one command
when the
Inherited Members
Namespace: Syncfusion.Windows.Forms.Spreadsheet.History
Assembly: Syncfusion.Spreadsheet.Windows.dll
Syntax
public class HistoryTransactionCommand : HistoryCommandBase
Remarks
The
Constructors
HistoryTransactionCommand(Spreadsheet, IRange[], GridCurrentCell)
Declaration
public HistoryTransactionCommand(Spreadsheet sfSpreadsheet, IRange[] ranges, GridCurrentCell currentCell)
Parameters
Type | Name | Description |
---|---|---|
Spreadsheet | sfSpreadsheet | An instance of Spreadsheet. |
IRange[] | ranges | Specified excel ranges. |
GridCurrentCell | currentCell | Current cell in SpreadsheetGrid. |
HistoryTransactionCommand(Spreadsheet, IRange[], Int32, Int32, GridColumn)
Initializes a new instance of the HistoryTransactionCommand class.
Declaration
public HistoryTransactionCommand(Spreadsheet sfSpreadsheet, IRange[] ranges, int row, int col, GridColumn column)
Parameters
Type | Name | Description |
---|---|---|
Spreadsheet | sfSpreadsheet | An instance of Spreadsheet. |
IRange[] | ranges | Specified excel ranges. |
System.Int32 | row | Row index of the current cell. |
System.Int32 | col | Column index of the current cell. |
GridColumn | column | An instance of GridColumn. |
HistoryTransactionCommand(Spreadsheet, String)
Initializes a new HistoryTransactionCommand object and associates it with a
Declaration
public HistoryTransactionCommand(Spreadsheet sfSpreadsheet, string description)
Parameters
Type | Name | Description |
---|---|---|
Spreadsheet | sfSpreadsheet | An instance of Spreadsheet. |
System.String | description | Description of the commands. |
Properties
Description
Gets a description for the command.
Declaration
public override string Description { get; }
Property Value
Type |
---|
System.String |
Overrides
Stack
Gets a reference to the stack with all commands that belong to this transaction.
Declaration
public Stack<HistoryCommandBase> Stack { get; }
Property Value
Type |
---|
System.Collections.Generic.Stack<HistoryCommandBase> |
Methods
Execute(CommandMode)
Executes the transaction command in Spreadsheet.
Declaration
public override void Execute(CommandMode mode)
Parameters
Type | Name | Description |
---|---|---|
CommandMode | mode | Current transaction mode. |
Overrides
Peek()
Returns a reference to the latest command in the stack and leaves the command on the stack.
Declaration
public HistoryCommandBase Peek()
Returns
Type | Description |
---|---|
HistoryCommandBase | A reference to the latest HistoryCommandBase command. |
Pop(CommandMode)
Returns a reference to the latest command in the stack and removes the command from the stack.
Declaration
public HistoryCommandBase Pop(CommandMode mode)
Parameters
Type | Name | Description |
---|---|---|
CommandMode | mode |
Returns
Type | Description |
---|---|
HistoryCommandBase | A reference to the latest HistoryCommandBase command. |
Push(HistoryCommandBase)
Adds a new command to the current transaction.
Declaration
public void Push(HistoryCommandBase cmd)
Parameters
Type | Name | Description |
---|---|---|
HistoryCommandBase | cmd | The Command for the transaction. |