24 lines
471 B
C#
24 lines
471 B
C#
using Application = Microsoft.Office.Interop.Excel.Application;
|
|
|
|
namespace ExcelAddIn.Tools;
|
|
|
|
public class Button3Tool : Tool
|
|
{
|
|
private readonly Application app;
|
|
public Button3Tool()
|
|
{
|
|
app = (Application)ExcelDnaUtil.Application;
|
|
}
|
|
public override void Execute()
|
|
{
|
|
for (int i = 0; i < 10;)
|
|
{
|
|
Thread.Sleep(400);
|
|
app.StatusBar = $"Выполнено {++i * 10}%...";
|
|
}
|
|
}
|
|
protected override void Dispose(bool disposing)
|
|
{
|
|
app.StatusBar = false;
|
|
}
|
|
} |