Imports UTS_Core.UTSModule.Station

Public Class GridNodeMoveRightCommand : Implements ICommand
    Private ReadOnly grd As StationPlanGrid
    Private ReadOnly startMoveRow As Integer
    Private ReadOnly moveRows As Integer
    Private ReadOnly moveEndRow As Integer
    Private ReadOnly moveRightNodeIndex As Integer

    Sub New(grd As StationPlanGrid, startMoveRow As Integer, moveRows As Integer, moveEndRow As Integer, moveRightNodeIndex As Integer)
        Me.grd = grd
        Me.startMoveRow = startMoveRow
        Me.moveRows = moveRows
        Me.moveEndRow = moveEndRow
        Me.moveRightNodeIndex = moveRightNodeIndex
    End Sub

    Public Sub Redo() Implements ICommand.Redo
        grd.NodeMoveRightCommand(startMoveRow, moveRows, moveRightNodeIndex)
    End Sub

    Public Sub Undo() Implements ICommand.Undo
        grd.NodeMoveLeftCommand(moveEndRow, moveRows)
    End Sub
End Class
