diff options
Diffstat (limited to 'src/AddIn/AddIn.cs')
-rw-r--r-- | src/AddIn/AddIn.cs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/AddIn/AddIn.cs b/src/AddIn/AddIn.cs index b0fcc3b..ad77247 100644 --- a/src/AddIn/AddIn.cs +++ b/src/AddIn/AddIn.cs @@ -31,6 +31,24 @@ namespace RehauSku IntelliSenseServer.Install(); RegistryUtil.Initialize(); Excel = (Application)ExcelDnaUtil.Application; + AddEvents(); + } + + private void AddEvents() + { + Excel.SheetSelectionChange += RefreshExportButton; + Excel.SheetActivate += RefreshConvertButton; + Excel.WorkbookActivate += RefreshConvertButton; + } + + private void RefreshConvertButton(object sh) + { + Interface.RibbonController.RefreshControl("convertPrice"); + } + + private void RefreshExportButton(object sh, Range target) + { + Interface.RibbonController.RefreshControl("exportToPrice"); } public void AutoClose() |