32 lines
606 B
C#
32 lines
606 B
C#
using System;
|
|
|
|
namespace CPF.ReoGrid.Actions
|
|
{
|
|
public class HideRowsAction : WorksheetReusableAction
|
|
{
|
|
public HideRowsAction(int row, int count) : base(new RangePosition(row, 0, count, -1))
|
|
{
|
|
}
|
|
|
|
public override void Do()
|
|
{
|
|
base.Worksheet.HideRows(base.Range.Row, base.Range.Rows);
|
|
}
|
|
|
|
public override void Undo()
|
|
{
|
|
base.Worksheet.ShowRows(base.Range.Row, base.Range.Rows);
|
|
}
|
|
|
|
public override WorksheetReusableAction Clone(RangePosition range)
|
|
{
|
|
return new HideRowsAction(range.Row, range.Rows);
|
|
}
|
|
|
|
public override string GetName()
|
|
{
|
|
return "Hide Rows";
|
|
}
|
|
}
|
|
}
|