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