35 lines
734 B
C#
35 lines
734 B
C#
using System;
|
|
|
|
namespace CPF.ReoGrid.Actions
|
|
{
|
|
public class AddOutlineAction : OutlineAction
|
|
{
|
|
public AddOutlineAction(RowOrColumn rowOrColumn, int start, int count) : base(rowOrColumn, start, count)
|
|
{
|
|
}
|
|
|
|
public override void Do()
|
|
{
|
|
bool flag = base.Worksheet != null;
|
|
if (flag)
|
|
{
|
|
base.Worksheet.AddOutline(this.rowOrColumn, this.start, this.count);
|
|
}
|
|
}
|
|
|
|
public override void Undo()
|
|
{
|
|
bool flag = base.Worksheet != null;
|
|
if (flag)
|
|
{
|
|
base.Worksheet.RemoveOutline(this.rowOrColumn, this.start, this.count);
|
|
}
|
|
}
|
|
|
|
public override string GetName()
|
|
{
|
|
return string.Format("Add {0} Outline, Start at {1}, Count: {2}", base.GetRowOrColumnDesc(), this.start, this.count);
|
|
}
|
|
}
|
|
}
|