32 lines
624 B
C#
32 lines
624 B
C#
using System;
|
|
|
|
namespace CPF.ReoGrid.Actions
|
|
{
|
|
public class HideColumnsAction : WorksheetReusableAction
|
|
{
|
|
public HideColumnsAction(int col, int count) : base(new RangePosition(0, col, -1, count))
|
|
{
|
|
}
|
|
|
|
public override void Do()
|
|
{
|
|
base.Worksheet.HideColumns(base.Range.Col, base.Range.Cols);
|
|
}
|
|
|
|
public override void Undo()
|
|
{
|
|
base.Worksheet.ShowColumns(base.Range.Col, base.Range.Cols);
|
|
}
|
|
|
|
public override WorksheetReusableAction Clone(RangePosition range)
|
|
{
|
|
return new HideColumnsAction(range.Col, range.Cols);
|
|
}
|
|
|
|
public override string GetName()
|
|
{
|
|
return "Hide Columns";
|
|
}
|
|
}
|
|
}
|