aboutsummaryrefslogtreecommitdiff
path: root/src/AddIn/AddIn.cs
diff options
context:
space:
mode:
authorSergey Chebotar <s.chebotar@gmail.com>2022-02-04 17:13:47 +0300
committerSergey Chebotar <s.chebotar@gmail.com>2022-02-04 17:13:47 +0300
commitcc96e1ebe7255c7278c70cef0f951103e9844487 (patch)
tree85f8c6573b5c162c21a0adc192560a4e53732f69 /src/AddIn/AddIn.cs
parent6e889419e2658a3a80fa00582314f1428f6052e5 (diff)
Implement Enable/Disable tools buttons events
Diffstat (limited to 'src/AddIn/AddIn.cs')
-rw-r--r--src/AddIn/AddIn.cs18
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()