From 36c4d4480d3789aface2e81371c9dd5ee84e874d Mon Sep 17 00:00:00 2001 From: Sergey Chebotar Date: Tue, 20 Dec 2022 11:53:55 +0300 Subject: Rename Abstract classes --- src/Interface/StatusbarBase.cs | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/Interface/StatusbarBase.cs (limited to 'src/Interface/StatusbarBase.cs') diff --git a/src/Interface/StatusbarBase.cs b/src/Interface/StatusbarBase.cs new file mode 100644 index 0000000..f1af972 --- /dev/null +++ b/src/Interface/StatusbarBase.cs @@ -0,0 +1,25 @@ +using ExcelDna.Integration; +using Microsoft.Office.Interop.Excel; +using System; +using System.Threading; +using System.Threading.Tasks; + +namespace RhSolutions.Interface +{ + internal abstract class StatusbarBase : IDisposable + { + protected Application Excel = AddIn.Excel; + + public abstract void Update(); + + private static void ResetStatusBar() + { + AddIn.Excel.StatusBar = false; + } + + public void Dispose() + { + Task.Delay(5000).ContinueWith(t => ResetStatusBar()); + } + } +} -- cgit v1.2.3