Keep ResultBar update 5 seconds long. Turn off save as dialog after tools complete.

This commit is contained in:
Sergey Chebotar 2022-04-01 17:39:01 +03:00
parent 4d01a456e3
commit 84eab9425c
6 changed files with 12 additions and 15 deletions

View File

@ -1,4 +1,5 @@
using Microsoft.Office.Interop.Excel; using ExcelDna.Integration;
using Microsoft.Office.Interop.Excel;
namespace RehauSku.Interface namespace RehauSku.Interface
{ {
@ -7,5 +8,11 @@ namespace RehauSku.Interface
protected Application Excel = AddIn.Excel; protected Application Excel = AddIn.Excel;
public abstract void Update(); public abstract void Update();
[ExcelFunction]
public static void ResetStatusBar()
{
AddIn.Excel.StatusBar = false;
}
} }
} }

View File

@ -1,4 +1,5 @@
using System.Text; using System;
using System.Text;
namespace RehauSku.Interface namespace RehauSku.Interface
{ {
@ -39,6 +40,7 @@ namespace RehauSku.Interface
} }
Excel.StatusBar = sb.ToString(); Excel.StatusBar = sb.ToString();
AddIn.Excel.OnTime(DateTime.Now + new TimeSpan(0, 0, 5), "ResetStatusBar");
} }
} }
} }

View File

@ -50,9 +50,6 @@ namespace RehauSku.PriceListTools
FilterByAmount(); FilterByAmount();
ResultBar.Update(); ResultBar.Update();
Interface.Dialog.SaveWorkbookAs();
ExcelApp.StatusBar = false;
} }
} }
} }

View File

@ -24,9 +24,6 @@ namespace RehauSku.PriceListTools
FilterByAmount(); FilterByAmount();
ResultBar.Update(); ResultBar.Update();
Dialog.SaveWorkbookAs();
ExcelApp.StatusBar = false;
} }
} }
} }

View File

@ -34,9 +34,6 @@ namespace RehauSku.PriceListTools
FilterByAmount(); FilterByAmount();
ResultBar.Update(); ResultBar.Update();
Interface.Dialog.SaveWorkbookAs();
ExcelApp.StatusBar = false;
} }
private void GetSelected() private void GetSelected()

View File

@ -40,9 +40,6 @@ namespace RehauSku.PriceListTools
FilterByAmount(); FilterByAmount();
ResultBar.Update(); ResultBar.Update();
Dialog.SaveWorkbookAs();
ExcelApp.StatusBar = false;
} }
} }
} }