1
0
ExcelAddIn/Tools/Button3Tool.cs
2023-06-14 15:23:33 +03:00

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;
}
}