using ExcelDna.Integration; using Microsoft.Office.Interop.Excel; using RhSolutions.AddIn; using System; using System.Threading; using System.Threading.Tasks; namespace RhSolutions.Models { internal abstract class StatusbarBase : IDisposable { protected Application Excel = RhSolutionsAddIn.Excel; public abstract void Update(); private static void ResetStatusBar() { RhSolutionsAddIn.Excel.StatusBar = false; } public void Dispose() { Task.Delay(500).ContinueWith(t => ResetStatusBar()); } } }