CPF/CPF.ReoGrid/Actions/ExpandOutlineAction.cs

35 lines
748 B
C#
Raw Normal View History

2024-06-24 10:15:59 +08:00
using System;
namespace CPF.ReoGrid.Actions
{
public class ExpandOutlineAction : OutlineAction
{
public ExpandOutlineAction(RowOrColumn rowOrColumn, int start, int count) : base(rowOrColumn, start, count)
{
}
public override void Do()
{
bool flag = base.Worksheet != null;
if (flag)
{
base.Worksheet.ExpandOutline(this.rowOrColumn, this.start, this.count);
}
}
public override void Undo()
{
bool flag = base.Worksheet != null;
if (flag)
{
base.Worksheet.CollapseOutline(this.rowOrColumn, this.start, this.count);
}
}
public override string GetName()
{
return string.Format("Expand {0} Outline, Start at {1}, Count: {2}", base.GetRowOrColumnDesc(), this.start, this.count);
}
}
}